home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 2.1B1 / AIncludes / QuickTimeComponents.a < prev    next >
Encoding:
Text File  |  1995-04-18  |  168.8 KB  |  7,816 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        QuickTimeComponents.a
  3. ;
  4. ;    Contains:    QuickTime Interfaces.
  5. ;
  6. ;    Version:    Technology:    QuickTime 2.0
  7. ;                Package:    Universal Interfaces 2.1ß1 in “MPW Prerelease” on ETO #17
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__QUICKTIMECOMPONENTS__') = 'UNDEFINED' THEN
  21. __QUICKTIMECOMPONENTS__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  25.     include 'Components.a'
  26.     ENDIF
  27. ;        include 'Types.a'                                            ;
  28. ;            include 'ConditionalMacros.a'                            ;
  29. ;        include 'MixedMode.a'                                        ;
  30.  
  31.     IF &TYPE('__IMAGECOMPRESSION__') = 'UNDEFINED' THEN
  32.     include 'ImageCompression.a'
  33.     ENDIF
  34. ;        include 'Quickdraw.a'                                        ;
  35. ;            include 'QuickdrawText.a'                                ;
  36. ;        include 'QDOffscreen.a'                                    ;
  37. ;            include 'Errors.a'                                        ;
  38. ;        include 'Windows.a'                                        ;
  39. ;            include 'Memory.a'                                        ;
  40. ;            include 'Events.a'                                        ;
  41. ;                include 'OSUtils.a'                                ;
  42. ;            include 'Controls.a'                                    ;
  43. ;                include 'Menus.a'                                    ;
  44. ;        include 'StandardFile.a'                                    ;
  45. ;            include 'Dialogs.a'                                    ;
  46. ;                include 'TextEdit.a'                                ;
  47. ;            include 'Files.a'                                        ;
  48.  
  49.     IF &TYPE('__MOVIES__') = 'UNDEFINED' THEN
  50.     include 'Movies.a'
  51.     ENDIF
  52. ;        include 'Aliases.a'                                        ;
  53. ;            include 'AppleTalk.a'                                    ;
  54.  
  55.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  56.     include 'Quickdraw.a'
  57.     ENDIF
  58.  
  59.     IF &TYPE('__VIDEO__') = 'UNDEFINED' THEN
  60.     include 'Video.a'
  61.     ENDIF
  62.  
  63.     IF &TYPE('__MEMORY__') = 'UNDEFINED' THEN
  64.     include 'Memory.a'
  65.     ENDIF
  66.  
  67. clockComponentType                EQU        'clok'
  68. systemTickClock                    EQU        'tick'                ; subtype: 60ths since boot        
  69. systemSecondClock                EQU        'seco'                ; subtype: seconds since 1904        
  70. systemMillisecondClock            EQU        'mill'                ; subtype: 1000ths since boot        
  71. systemMicrosecondClock            EQU        'micr'
  72.  
  73. kClockRateIsLinear                EQU        1
  74. kClockImplementsCallBacks        EQU        2
  75.  
  76. ;* These are Clock procedures *
  77. ;
  78. ; pascal ComponentResult ClockGetTime(ComponentInstance aClock, TimeRecord *out)
  79. ;
  80.     IF ¬ GENERATINGCFM THEN
  81.         Macro
  82.         _ClockGetTime
  83.             dc.w     $2F3C
  84.             dc.w     $0004
  85.             dc.w     $0001
  86.             moveq    #0,d0
  87.             dc.w     $A82A
  88.         EndM
  89.     ELSE
  90.         IMPORT_CFM_FUNCTION    ClockGetTime
  91.     ENDIF
  92.  
  93. ;
  94. ; pascal QTCallBack ClockNewCallBack(ComponentInstance aClock, TimeBase tb, short callBackType)
  95. ;
  96.     IF ¬ GENERATINGCFM THEN
  97.         Macro
  98.         _ClockNewCallBack
  99.             dc.w     $2F3C
  100.             dc.w     $0006
  101.             dc.w     $0002
  102.             moveq    #0,d0
  103.             dc.w     $A82A
  104.         EndM
  105.     ELSE
  106.         IMPORT_CFM_FUNCTION    ClockNewCallBack
  107.     ENDIF
  108.  
  109. ;
  110. ; pascal ComponentResult ClockDisposeCallBack(ComponentInstance aClock, QTCallBack cb)
  111. ;
  112.     IF ¬ GENERATINGCFM THEN
  113.         Macro
  114.         _ClockDisposeCallBack
  115.             dc.w     $2F3C
  116.             dc.w     $0004
  117.             dc.w     $0003
  118.             moveq    #0,d0
  119.             dc.w     $A82A
  120.         EndM
  121.     ELSE
  122.         IMPORT_CFM_FUNCTION    ClockDisposeCallBack
  123.     ENDIF
  124.  
  125. ;
  126. ; pascal ComponentResult ClockCallMeWhen(ComponentInstance aClock, QTCallBack cb, long param1, long param2, long param3)
  127. ;
  128.     IF ¬ GENERATINGCFM THEN
  129.         Macro
  130.         _ClockCallMeWhen
  131.             dc.w     $2F3C
  132.             dc.w     $0010
  133.             dc.w     $0004
  134.             moveq    #0,d0
  135.             dc.w     $A82A
  136.         EndM
  137.     ELSE
  138.         IMPORT_CFM_FUNCTION    ClockCallMeWhen
  139.     ENDIF
  140.  
  141. ;
  142. ; pascal ComponentResult ClockCancelCallBack(ComponentInstance aClock, QTCallBack cb)
  143. ;
  144.     IF ¬ GENERATINGCFM THEN
  145.         Macro
  146.         _ClockCancelCallBack
  147.             dc.w     $2F3C
  148.             dc.w     $0004
  149.             dc.w     $0005
  150.             moveq    #0,d0
  151.             dc.w     $A82A
  152.         EndM
  153.     ELSE
  154.         IMPORT_CFM_FUNCTION    ClockCancelCallBack
  155.     ENDIF
  156.  
  157. ;
  158. ; pascal ComponentResult ClockRateChanged(ComponentInstance aClock, QTCallBack cb)
  159. ;
  160.     IF ¬ GENERATINGCFM THEN
  161.         Macro
  162.         _ClockRateChanged
  163.             dc.w     $2F3C
  164.             dc.w     $0004
  165.             dc.w     $0006
  166.             moveq    #0,d0
  167.             dc.w     $A82A
  168.         EndM
  169.     ELSE
  170.         IMPORT_CFM_FUNCTION    ClockRateChanged
  171.     ENDIF
  172.  
  173. ;
  174. ; pascal ComponentResult ClockTimeChanged(ComponentInstance aClock, QTCallBack cb)
  175. ;
  176.     IF ¬ GENERATINGCFM THEN
  177.         Macro
  178.         _ClockTimeChanged
  179.             dc.w     $2F3C
  180.             dc.w     $0004
  181.             dc.w     $0007
  182.             moveq    #0,d0
  183.             dc.w     $A82A
  184.         EndM
  185.     ELSE
  186.         IMPORT_CFM_FUNCTION    ClockTimeChanged
  187.     ENDIF
  188.  
  189. ;
  190. ; pascal ComponentResult ClockSetTimeBase(ComponentInstance aClock, TimeBase tb)
  191. ;
  192.     IF ¬ GENERATINGCFM THEN
  193.         Macro
  194.         _ClockSetTimeBase
  195.             dc.w     $2F3C
  196.             dc.w     $0004
  197.             dc.w     $0008
  198.             moveq    #0,d0
  199.             dc.w     $A82A
  200.         EndM
  201.     ELSE
  202.         IMPORT_CFM_FUNCTION    ClockSetTimeBase
  203.     ENDIF
  204.  
  205. ;
  206. ; pascal ComponentResult ClockStartStopChanged(ComponentInstance aClock, QTCallBack cb, Boolean startChanged, Boolean stopChanged)
  207. ;
  208.     IF ¬ GENERATINGCFM THEN
  209.         Macro
  210.         _ClockStartStopChanged
  211.             dc.w     $2F3C
  212.             dc.w     $0008
  213.             dc.w     $0009
  214.             moveq    #0,d0
  215.             dc.w     $A82A
  216.         EndM
  217.     ELSE
  218.         IMPORT_CFM_FUNCTION    ClockStartStopChanged
  219.     ENDIF
  220.  
  221. ;
  222. ; pascal ComponentResult ClockGetRate(ComponentInstance aClock, Fixed *rate)
  223. ;
  224.     IF ¬ GENERATINGCFM THEN
  225.         Macro
  226.         _ClockGetRate
  227.             dc.w     $2F3C
  228.             dc.w     $0004
  229.             dc.w     $000A
  230.             moveq    #0,d0
  231.             dc.w     $A82A
  232.         EndM
  233.     ELSE
  234.         IMPORT_CFM_FUNCTION    ClockGetRate
  235.     ENDIF
  236.  
  237. kClockGetTimeSelect                EQU        $1
  238. kClockNewCallBackSelect            EQU        $2
  239. kClockDisposeCallBackSelect        EQU        $3
  240. kClockCallMeWhenSelect            EQU        $4
  241. kClockCancelCallBackSelect        EQU        $5
  242. kClockRateChangedSelect            EQU        $6
  243. kClockTimeChangedSelect            EQU        $7
  244. kClockSetTimeBaseSelect            EQU        $8
  245. kClockStartStopChangedSelect    EQU        $9
  246. kClockGetRateSelect                EQU        $A
  247.  
  248. ;
  249. ;    General Sequence Grab stuff
  250. ;
  251. ; typedef ComponentInstance  SeqGrabComponent
  252. ; typedef ComponentInstance  SGChannel
  253.  
  254. SeqGrabComponentType            EQU        'barg'
  255. SeqGrabChannelType                EQU        'sgch'
  256. SeqGrabPanelType                EQU        'sgpn'
  257. SeqGrabCompressionPanelType        EQU        'comp'
  258. SeqGrabSourcePanelType            EQU        'sour'
  259.  
  260. seqGrabToDisk                    EQU        1
  261. seqGrabToMemory                    EQU        2
  262. seqGrabDontUseTempMemory        EQU        4
  263. seqGrabAppendToFile                EQU        8
  264. seqGrabDontAddMovieResource        EQU        16
  265. seqGrabDontMakeMovie            EQU        32
  266. seqGrabPreExtendFile            EQU        64
  267. seqGrabDataProcIsInterruptSafe    EQU        128
  268. seqGrabDataProcDoesOverlappingReads EQU        256
  269.  
  270. ; typedef unsigned long     SeqGrabDataOutputEnum
  271.  
  272. seqGrabRecord                    EQU        1
  273. seqGrabPreview                    EQU        2
  274. seqGrabPlayDuringRecord            EQU        4
  275.  
  276. ; typedef unsigned long     SeqGrabUsageEnum
  277.  
  278. seqGrabHasBounds                EQU        1
  279. seqGrabHasVolume                EQU        2
  280. seqGrabHasDiscreteSamples        EQU        4
  281.  
  282. ; typedef unsigned long     SeqGrabChannelInfoEnum
  283. SeqGrabFrameInfo         RECORD    0
  284. frameOffset                 ds.l   1        ; offset: $0 (0)
  285. frameTime                 ds.l   1        ; offset: $4 (4)
  286. frameSize                 ds.l   1        ; offset: $8 (8)
  287. frameChannel             ds.l   1        ; offset: $C (12)
  288. frameRefCon                 ds.l   1        ; offset: $10 (16)
  289. sizeof                     EQU *            ; size:   $14 (20)
  290.                         ENDR
  291.  
  292. ; typedef struct SeqGrabFrameInfo  SeqGrabFrameInfo, *SeqGrabFrameInfoPtr
  293.  
  294. grabPictOffScreen                EQU        1
  295. grabPictIgnoreClip                EQU        2
  296. grabPictCurrentImage            EQU        4
  297.  
  298. sgFlagControlledGrab            EQU        (1 << 0)
  299.  
  300. SGDeviceName             RECORD    0
  301. name                     ds.l   16        ; offset: $0 (0)
  302. icon                     ds.l   1        ; offset: $40 (64)
  303. flags                     ds.l   1        ; offset: $44 (68)
  304. refCon                     ds.l   1        ; offset: $48 (72)
  305. reserved                 ds.l   1        ; offset: $4C (76)        ; zero
  306. sizeof                     EQU *            ; size:   $50 (80)
  307.                         ENDR
  308.  
  309. ; typedef struct SGDeviceName  SGDeviceName
  310.  
  311. sgDeviceNameFlagDeviceUnavailable EQU        (1 << 0)
  312.  
  313. SGDeviceListRecord         RECORD    0
  314. count                     ds.w   1        ; offset: $0 (0)
  315. selectedIndex             ds.w   1        ; offset: $2 (2)
  316. reserved                 ds.l   1        ; offset: $4 (4)        ; zero
  317. entry                     ds     SGDeviceName ; offset: $8 (8)
  318. sizeof                     EQU *            ; size:   $58 (88)
  319.                         ENDR
  320.  
  321. ; typedef struct SGDeviceListRecord  SGDeviceListRecord, *SGDeviceListPtr, **SGDeviceList
  322.  
  323. sgDeviceListWithIcons            EQU        (1 << 0)
  324. sgDeviceListDontCheckAvailability EQU        (1 << 1)
  325.  
  326. seqGrabWriteAppend                EQU        0
  327. seqGrabWriteReserve                EQU        1
  328. seqGrabWriteFill                EQU        2
  329.  
  330. seqGrabUnpause                    EQU        0
  331. seqGrabPause                    EQU        1
  332. seqGrabPauseForMenu                EQU        3
  333.  
  334. channelFlagDontOpenResFile        EQU        2
  335. channelFlagHasDependency        EQU        4
  336.  
  337. sgPanelFlagForPanel                EQU        1
  338.  
  339. SGOutputRecord             RECORD    0
  340. data                     ds.l   1        ; offset: $0 (0)
  341. sizeof                     EQU *            ; size:   $4 (4)
  342.                         ENDR
  343.  
  344. ; typedef struct SGOutputRecord  SGOutputRecord, *SGOutput
  345.  
  346. channelPlayNormal                EQU        0
  347. channelPlayFast                    EQU        1
  348. channelPlayHighQuality            EQU        2
  349. channelPlayAllData                EQU        4
  350.  
  351. ;
  352. ; pascal ComponentResult SGInitialize(SeqGrabComponent s)
  353. ;
  354.     IF ¬ GENERATINGCFM THEN
  355.         Macro
  356.         _SGInitialize
  357.             dc.w     $2F3C
  358.             dc.w     $0000
  359.             dc.w     $0001
  360.             moveq    #0,d0
  361.             dc.w     $A82A
  362.         EndM
  363.     ELSE
  364.         IMPORT_CFM_FUNCTION    SGInitialize
  365.     ENDIF
  366.  
  367. ;
  368. ; pascal ComponentResult SGSetDataOutput(SeqGrabComponent s, const FSSpec *movieFile, long whereFlags)
  369. ;
  370.     IF ¬ GENERATINGCFM THEN
  371.         Macro
  372.         _SGSetDataOutput
  373.             dc.w     $2F3C
  374.             dc.w     $0008
  375.             dc.w     $0002
  376.             moveq    #0,d0
  377.             dc.w     $A82A
  378.         EndM
  379.     ELSE
  380.         IMPORT_CFM_FUNCTION    SGSetDataOutput
  381.     ENDIF
  382.  
  383. ;
  384. ; pascal ComponentResult SGGetDataOutput(SeqGrabComponent s, FSSpec *movieFile, long *whereFlags)
  385. ;
  386.     IF ¬ GENERATINGCFM THEN
  387.         Macro
  388.         _SGGetDataOutput
  389.             dc.w     $2F3C
  390.             dc.w     $0008
  391.             dc.w     $0003
  392.             moveq    #0,d0
  393.             dc.w     $A82A
  394.         EndM
  395.     ELSE
  396.         IMPORT_CFM_FUNCTION    SGGetDataOutput
  397.     ENDIF
  398.  
  399. ;
  400. ; pascal ComponentResult SGSetGWorld(SeqGrabComponent s, CGrafPtr gp, GDHandle gd)
  401. ;
  402.     IF ¬ GENERATINGCFM THEN
  403.         Macro
  404.         _SGSetGWorld
  405.             dc.w     $2F3C
  406.             dc.w     $0008
  407.             dc.w     $0004
  408.             moveq    #0,d0
  409.             dc.w     $A82A
  410.         EndM
  411.     ELSE
  412.         IMPORT_CFM_FUNCTION    SGSetGWorld
  413.     ENDIF
  414.  
  415. ;
  416. ; pascal ComponentResult SGGetGWorld(SeqGrabComponent s, CGrafPtr *gp, GDHandle *gd)
  417. ;
  418.     IF ¬ GENERATINGCFM THEN
  419.         Macro
  420.         _SGGetGWorld
  421.             dc.w     $2F3C
  422.             dc.w     $0008
  423.             dc.w     $0005
  424.             moveq    #0,d0
  425.             dc.w     $A82A
  426.         EndM
  427.     ELSE
  428.         IMPORT_CFM_FUNCTION    SGGetGWorld
  429.     ENDIF
  430.  
  431. ;
  432. ; pascal ComponentResult SGNewChannel(SeqGrabComponent s, OSType channelType, SGChannel *ref)
  433. ;
  434.     IF ¬ GENERATINGCFM THEN
  435.         Macro
  436.         _SGNewChannel
  437.             dc.w     $2F3C
  438.             dc.w     $0008
  439.             dc.w     $0006
  440.             moveq    #0,d0
  441.             dc.w     $A82A
  442.         EndM
  443.     ELSE
  444.         IMPORT_CFM_FUNCTION    SGNewChannel
  445.     ENDIF
  446.  
  447. ;
  448. ; pascal ComponentResult SGDisposeChannel(SeqGrabComponent s, SGChannel c)
  449. ;
  450.     IF ¬ GENERATINGCFM THEN
  451.         Macro
  452.         _SGDisposeChannel
  453.             dc.w     $2F3C
  454.             dc.w     $0004
  455.             dc.w     $0007
  456.             moveq    #0,d0
  457.             dc.w     $A82A
  458.         EndM
  459.     ELSE
  460.         IMPORT_CFM_FUNCTION    SGDisposeChannel
  461.     ENDIF
  462.  
  463. ;
  464. ; pascal ComponentResult SGStartPreview(SeqGrabComponent s)
  465. ;
  466.     IF ¬ GENERATINGCFM THEN
  467.         Macro
  468.         _SGStartPreview
  469.             dc.w     $2F3C
  470.             dc.w     $0000
  471.             dc.w     $0010
  472.             moveq    #0,d0
  473.             dc.w     $A82A
  474.         EndM
  475.     ELSE
  476.         IMPORT_CFM_FUNCTION    SGStartPreview
  477.     ENDIF
  478.  
  479. ;
  480. ; pascal ComponentResult SGStartRecord(SeqGrabComponent s)
  481. ;
  482.     IF ¬ GENERATINGCFM THEN
  483.         Macro
  484.         _SGStartRecord
  485.             dc.w     $2F3C
  486.             dc.w     $0000
  487.             dc.w     $0011
  488.             moveq    #0,d0
  489.             dc.w     $A82A
  490.         EndM
  491.     ELSE
  492.         IMPORT_CFM_FUNCTION    SGStartRecord
  493.     ENDIF
  494.  
  495. ;
  496. ; pascal ComponentResult SGIdle(SeqGrabComponent s)
  497. ;
  498.     IF ¬ GENERATINGCFM THEN
  499.         Macro
  500.         _SGIdle
  501.             dc.w     $2F3C
  502.             dc.w     $0000
  503.             dc.w     $0012
  504.             moveq    #0,d0
  505.             dc.w     $A82A
  506.         EndM
  507.     ELSE
  508.         IMPORT_CFM_FUNCTION    SGIdle
  509.     ENDIF
  510.  
  511. ;
  512. ; pascal ComponentResult SGStop(SeqGrabComponent s)
  513. ;
  514.     IF ¬ GENERATINGCFM THEN
  515.         Macro
  516.         _SGStop
  517.             dc.w     $2F3C
  518.             dc.w     $0000
  519.             dc.w     $0013
  520.             moveq    #0,d0
  521.             dc.w     $A82A
  522.         EndM
  523.     ELSE
  524.         IMPORT_CFM_FUNCTION    SGStop
  525.     ENDIF
  526.  
  527. ;
  528. ; pascal ComponentResult SGPause(SeqGrabComponent s, Byte pause)
  529. ;
  530.     IF ¬ GENERATINGCFM THEN
  531.         Macro
  532.         _SGPause
  533.             dc.w     $2F3C
  534.             dc.w     $0002
  535.             dc.w     $0014
  536.             moveq    #0,d0
  537.             dc.w     $A82A
  538.         EndM
  539.     ELSE
  540.         IMPORT_CFM_FUNCTION    SGPause
  541.     ENDIF
  542.  
  543. ;
  544. ; pascal ComponentResult SGPrepare(SeqGrabComponent s, Boolean prepareForPreview, Boolean prepareForRecord)
  545. ;
  546.     IF ¬ GENERATINGCFM THEN
  547.         Macro
  548.         _SGPrepare
  549.             dc.w     $2F3C
  550.             dc.w     $0004
  551.             dc.w     $0015
  552.             moveq    #0,d0
  553.             dc.w     $A82A
  554.         EndM
  555.     ELSE
  556.         IMPORT_CFM_FUNCTION    SGPrepare
  557.     ENDIF
  558.  
  559. ;
  560. ; pascal ComponentResult SGRelease(SeqGrabComponent s)
  561. ;
  562.     IF ¬ GENERATINGCFM THEN
  563.         Macro
  564.         _SGRelease
  565.             dc.w     $2F3C
  566.             dc.w     $0000
  567.             dc.w     $0016
  568.             moveq    #0,d0
  569.             dc.w     $A82A
  570.         EndM
  571.     ELSE
  572.         IMPORT_CFM_FUNCTION    SGRelease
  573.     ENDIF
  574.  
  575. ;
  576. ; pascal Movie SGGetMovie(SeqGrabComponent s)
  577. ;
  578.     IF ¬ GENERATINGCFM THEN
  579.         Macro
  580.         _SGGetMovie
  581.             dc.w     $2F3C
  582.             dc.w     $0000
  583.             dc.w     $0017
  584.             moveq    #0,d0
  585.             dc.w     $A82A
  586.         EndM
  587.     ELSE
  588.         IMPORT_CFM_FUNCTION    SGGetMovie
  589.     ENDIF
  590.  
  591. ;
  592. ; pascal ComponentResult SGSetMaximumRecordTime(SeqGrabComponent s, unsigned long ticks)
  593. ;
  594.     IF ¬ GENERATINGCFM THEN
  595.         Macro
  596.         _SGSetMaximumRecordTime
  597.             dc.w     $2F3C
  598.             dc.w     $0004
  599.             dc.w     $0018
  600.             moveq    #0,d0
  601.             dc.w     $A82A
  602.         EndM
  603.     ELSE
  604.         IMPORT_CFM_FUNCTION    SGSetMaximumRecordTime
  605.     ENDIF
  606.  
  607. ;
  608. ; pascal ComponentResult SGGetMaximumRecordTime(SeqGrabComponent s, unsigned long *ticks)
  609. ;
  610.     IF ¬ GENERATINGCFM THEN
  611.         Macro
  612.         _SGGetMaximumRecordTime
  613.             dc.w     $2F3C
  614.             dc.w     $0004
  615.             dc.w     $0019
  616.             moveq    #0,d0
  617.             dc.w     $A82A
  618.         EndM
  619.     ELSE
  620.         IMPORT_CFM_FUNCTION    SGGetMaximumRecordTime
  621.     ENDIF
  622.  
  623. ;
  624. ; pascal ComponentResult SGGetStorageSpaceRemaining(SeqGrabComponent s, unsigned long *bytes)
  625. ;
  626.     IF ¬ GENERATINGCFM THEN
  627.         Macro
  628.         _SGGetStorageSpaceRemaining
  629.             dc.w     $2F3C
  630.             dc.w     $0004
  631.             dc.w     $001A
  632.             moveq    #0,d0
  633.             dc.w     $A82A
  634.         EndM
  635.     ELSE
  636.         IMPORT_CFM_FUNCTION    SGGetStorageSpaceRemaining
  637.     ENDIF
  638.  
  639. ;
  640. ; pascal ComponentResult SGGetTimeRemaining(SeqGrabComponent s, long *ticksLeft)
  641. ;
  642.     IF ¬ GENERATINGCFM THEN
  643.         Macro
  644.         _SGGetTimeRemaining
  645.             dc.w     $2F3C
  646.             dc.w     $0004
  647.             dc.w     $001B
  648.             moveq    #0,d0
  649.             dc.w     $A82A
  650.         EndM
  651.     ELSE
  652.         IMPORT_CFM_FUNCTION    SGGetTimeRemaining
  653.     ENDIF
  654.  
  655. ;
  656. ; pascal ComponentResult SGGrabPict(SeqGrabComponent s, PicHandle *p, const Rect *bounds, short offscreenDepth, long grabPictFlags)
  657. ;
  658.     IF ¬ GENERATINGCFM THEN
  659.         Macro
  660.         _SGGrabPict
  661.             dc.w     $2F3C
  662.             dc.w     $000E
  663.             dc.w     $001C
  664.             moveq    #0,d0
  665.             dc.w     $A82A
  666.         EndM
  667.     ELSE
  668.         IMPORT_CFM_FUNCTION    SGGrabPict
  669.     ENDIF
  670.  
  671. ;
  672. ; pascal ComponentResult SGGetLastMovieResID(SeqGrabComponent s, short *resID)
  673. ;
  674.     IF ¬ GENERATINGCFM THEN
  675.         Macro
  676.         _SGGetLastMovieResID
  677.             dc.w     $2F3C
  678.             dc.w     $0004
  679.             dc.w     $001D
  680.             moveq    #0,d0
  681.             dc.w     $A82A
  682.         EndM
  683.     ELSE
  684.         IMPORT_CFM_FUNCTION    SGGetLastMovieResID
  685.     ENDIF
  686.  
  687. ;
  688. ; pascal ComponentResult SGSetFlags(SeqGrabComponent s, long sgFlags)
  689. ;
  690.     IF ¬ GENERATINGCFM THEN
  691.         Macro
  692.         _SGSetFlags
  693.             dc.w     $2F3C
  694.             dc.w     $0004
  695.             dc.w     $001E
  696.             moveq    #0,d0
  697.             dc.w     $A82A
  698.         EndM
  699.     ELSE
  700.         IMPORT_CFM_FUNCTION    SGSetFlags
  701.     ENDIF
  702.  
  703. ;
  704. ; pascal ComponentResult SGGetFlags(SeqGrabComponent s, long *sgFlags)
  705. ;
  706.     IF ¬ GENERATINGCFM THEN
  707.         Macro
  708.         _SGGetFlags
  709.             dc.w     $2F3C
  710.             dc.w     $0004
  711.             dc.w     $001F
  712.             moveq    #0,d0
  713.             dc.w     $A82A
  714.         EndM
  715.     ELSE
  716.         IMPORT_CFM_FUNCTION    SGGetFlags
  717.     ENDIF
  718.  
  719. ;
  720. ; pascal ComponentResult SGSetDataProc(SeqGrabComponent s, SGDataUPP proc, long refCon)
  721. ;
  722.     IF ¬ GENERATINGCFM THEN
  723.         Macro
  724.         _SGSetDataProc
  725.             dc.w     $2F3C
  726.             dc.w     $0008
  727.             dc.w     $0020
  728.             moveq    #0,d0
  729.             dc.w     $A82A
  730.         EndM
  731.     ELSE
  732.         IMPORT_CFM_FUNCTION    SGSetDataProc
  733.     ENDIF
  734.  
  735. ;
  736. ; pascal ComponentResult SGNewChannelFromComponent(SeqGrabComponent s, SGChannel *newChannel, Component sgChannelComponent)
  737. ;
  738.     IF ¬ GENERATINGCFM THEN
  739.         Macro
  740.         _SGNewChannelFromComponent
  741.             dc.w     $2F3C
  742.             dc.w     $0008
  743.             dc.w     $0021
  744.             moveq    #0,d0
  745.             dc.w     $A82A
  746.         EndM
  747.     ELSE
  748.         IMPORT_CFM_FUNCTION    SGNewChannelFromComponent
  749.     ENDIF
  750.  
  751. ;
  752. ; pascal ComponentResult SGDisposeDeviceList(SeqGrabComponent s, SGDeviceList list)
  753. ;
  754.     IF ¬ GENERATINGCFM THEN
  755.         Macro
  756.         _SGDisposeDeviceList
  757.             dc.w     $2F3C
  758.             dc.w     $0004
  759.             dc.w     $0022
  760.             moveq    #0,d0
  761.             dc.w     $A82A
  762.         EndM
  763.     ELSE
  764.         IMPORT_CFM_FUNCTION    SGDisposeDeviceList
  765.     ENDIF
  766.  
  767. ;
  768. ; pascal ComponentResult SGAppendDeviceListToMenu(SeqGrabComponent s, SGDeviceList list, MenuHandle mh)
  769. ;
  770.     IF ¬ GENERATINGCFM THEN
  771.         Macro
  772.         _SGAppendDeviceListToMenu
  773.             dc.w     $2F3C
  774.             dc.w     $0008
  775.             dc.w     $0023
  776.             moveq    #0,d0
  777.             dc.w     $A82A
  778.         EndM
  779.     ELSE
  780.         IMPORT_CFM_FUNCTION    SGAppendDeviceListToMenu
  781.     ENDIF
  782.  
  783. ;
  784. ; pascal ComponentResult SGSetSettings(SeqGrabComponent s, UserData ud, long flags)
  785. ;
  786.     IF ¬ GENERATINGCFM THEN
  787.         Macro
  788.         _SGSetSettings
  789.             dc.w     $2F3C
  790.             dc.w     $0008
  791.             dc.w     $0024
  792.             moveq    #0,d0
  793.             dc.w     $A82A
  794.         EndM
  795.     ELSE
  796.         IMPORT_CFM_FUNCTION    SGSetSettings
  797.     ENDIF
  798.  
  799. ;
  800. ; pascal ComponentResult SGGetSettings(SeqGrabComponent s, UserData *ud, long flags)
  801. ;
  802.     IF ¬ GENERATINGCFM THEN
  803.         Macro
  804.         _SGGetSettings
  805.             dc.w     $2F3C
  806.             dc.w     $0008
  807.             dc.w     $0025
  808.             moveq    #0,d0
  809.             dc.w     $A82A
  810.         EndM
  811.     ELSE
  812.         IMPORT_CFM_FUNCTION    SGGetSettings
  813.     ENDIF
  814.  
  815. ;
  816. ; pascal ComponentResult SGGetIndChannel(SeqGrabComponent s, short index, SGChannel *ref, OSType *chanType)
  817. ;
  818.     IF ¬ GENERATINGCFM THEN
  819.         Macro
  820.         _SGGetIndChannel
  821.             dc.w     $2F3C
  822.             dc.w     $000A
  823.             dc.w     $0026
  824.             moveq    #0,d0
  825.             dc.w     $A82A
  826.         EndM
  827.     ELSE
  828.         IMPORT_CFM_FUNCTION    SGGetIndChannel
  829.     ENDIF
  830.  
  831. ;
  832. ; pascal ComponentResult SGUpdate(SeqGrabComponent s, RgnHandle updateRgn)
  833. ;
  834.     IF ¬ GENERATINGCFM THEN
  835.         Macro
  836.         _SGUpdate
  837.             dc.w     $2F3C
  838.             dc.w     $0004
  839.             dc.w     $0027
  840.             moveq    #0,d0
  841.             dc.w     $A82A
  842.         EndM
  843.     ELSE
  844.         IMPORT_CFM_FUNCTION    SGUpdate
  845.     ENDIF
  846.  
  847. ;
  848. ; pascal ComponentResult SGGetPause(SeqGrabComponent s, Byte *paused)
  849. ;
  850.     IF ¬ GENERATINGCFM THEN
  851.         Macro
  852.         _SGGetPause
  853.             dc.w     $2F3C
  854.             dc.w     $0004
  855.             dc.w     $0028
  856.             moveq    #0,d0
  857.             dc.w     $A82A
  858.         EndM
  859.     ELSE
  860.         IMPORT_CFM_FUNCTION    SGGetPause
  861.     ENDIF
  862.  
  863. ;
  864. ; pascal ComponentResult SGSettingsDialog(SeqGrabComponent s, SGChannel c, short numPanels, Component *panelList, long flags, SGModalFilterUPP proc, long procRefNum)
  865. ;
  866.     IF ¬ GENERATINGCFM THEN
  867.         Macro
  868.         _SGSettingsDialog
  869.             dc.w     $2F3C
  870.             dc.w     $0016
  871.             dc.w     $0029
  872.             moveq    #0,d0
  873.             dc.w     $A82A
  874.         EndM
  875.     ELSE
  876.         IMPORT_CFM_FUNCTION    SGSettingsDialog
  877.     ENDIF
  878.  
  879. ;
  880. ; pascal ComponentResult SGGetAlignmentProc(SeqGrabComponent s, ICMAlignmentProcRecordPtr alignmentProc)
  881. ;
  882.     IF ¬ GENERATINGCFM THEN
  883.         Macro
  884.         _SGGetAlignmentProc
  885.             dc.w     $2F3C
  886.             dc.w     $0004
  887.             dc.w     $002A
  888.             moveq    #0,d0
  889.             dc.w     $A82A
  890.         EndM
  891.     ELSE
  892.         IMPORT_CFM_FUNCTION    SGGetAlignmentProc
  893.     ENDIF
  894.  
  895. ;
  896. ; pascal ComponentResult SGSetChannelSettings(SeqGrabComponent s, SGChannel c, UserData ud, long flags)
  897. ;
  898.     IF ¬ GENERATINGCFM THEN
  899.         Macro
  900.         _SGSetChannelSettings
  901.             dc.w     $2F3C
  902.             dc.w     $000C
  903.             dc.w     $002B
  904.             moveq    #0,d0
  905.             dc.w     $A82A
  906.         EndM
  907.     ELSE
  908.         IMPORT_CFM_FUNCTION    SGSetChannelSettings
  909.     ENDIF
  910.  
  911. ;
  912. ; pascal ComponentResult SGGetChannelSettings(SeqGrabComponent s, SGChannel c, UserData *ud, long flags)
  913. ;
  914.     IF ¬ GENERATINGCFM THEN
  915.         Macro
  916.         _SGGetChannelSettings
  917.             dc.w     $2F3C
  918.             dc.w     $000C
  919.             dc.w     $002C
  920.             moveq    #0,d0
  921.             dc.w     $A82A
  922.         EndM
  923.     ELSE
  924.         IMPORT_CFM_FUNCTION    SGGetChannelSettings
  925.     ENDIF
  926.  
  927. ;
  928. ; pascal ComponentResult SGGetMode(SeqGrabComponent s, Boolean *previewMode, Boolean *recordMode)
  929. ;
  930.     IF ¬ GENERATINGCFM THEN
  931.         Macro
  932.         _SGGetMode
  933.             dc.w     $2F3C
  934.             dc.w     $0008
  935.             dc.w     $002D
  936.             moveq    #0,d0
  937.             dc.w     $A82A
  938.         EndM
  939.     ELSE
  940.         IMPORT_CFM_FUNCTION    SGGetMode
  941.     ENDIF
  942.  
  943. ;
  944. ; pascal ComponentResult SGSetDataRef(SeqGrabComponent s, Handle dataRef, OSType dataRefType, long whereFlags)
  945. ;
  946.     IF ¬ GENERATINGCFM THEN
  947.         Macro
  948.         _SGSetDataRef
  949.             dc.w     $2F3C
  950.             dc.w     $000C
  951.             dc.w     $002E
  952.             moveq    #0,d0
  953.             dc.w     $A82A
  954.         EndM
  955.     ELSE
  956.         IMPORT_CFM_FUNCTION    SGSetDataRef
  957.     ENDIF
  958.  
  959. ;
  960. ; pascal ComponentResult SGGetDataRef(SeqGrabComponent s, Handle *dataRef, OSType *dataRefType, long *whereFlags)
  961. ;
  962.     IF ¬ GENERATINGCFM THEN
  963.         Macro
  964.         _SGGetDataRef
  965.             dc.w     $2F3C
  966.             dc.w     $000C
  967.             dc.w     $002F
  968.             moveq    #0,d0
  969.             dc.w     $A82A
  970.         EndM
  971.     ELSE
  972.         IMPORT_CFM_FUNCTION    SGGetDataRef
  973.     ENDIF
  974.  
  975. ;
  976. ; pascal ComponentResult SGNewOutput(SeqGrabComponent s, Handle dataRef, OSType dataRefType, long whereFlags, SGOutput *output)
  977. ;
  978.     IF ¬ GENERATINGCFM THEN
  979.         Macro
  980.         _SGNewOutput
  981.             dc.w     $2F3C
  982.             dc.w     $0010
  983.             dc.w     $0030
  984.             moveq    #0,d0
  985.             dc.w     $A82A
  986.         EndM
  987.     ELSE
  988.         IMPORT_CFM_FUNCTION    SGNewOutput
  989.     ENDIF
  990.  
  991. ;
  992. ; pascal ComponentResult SGDisposeOutput(SeqGrabComponent s, SGOutput output)
  993. ;
  994.     IF ¬ GENERATINGCFM THEN
  995.         Macro
  996.         _SGDisposeOutput
  997.             dc.w     $2F3C
  998.             dc.w     $0004
  999.             dc.w     $0031
  1000.             moveq    #0,d0
  1001.             dc.w     $A82A
  1002.         EndM
  1003.     ELSE
  1004.         IMPORT_CFM_FUNCTION    SGDisposeOutput
  1005.     ENDIF
  1006.  
  1007. ;
  1008. ; pascal ComponentResult SGSetOutputFlags(SeqGrabComponent s, SGOutput output, long whereFlags)
  1009. ;
  1010.     IF ¬ GENERATINGCFM THEN
  1011.         Macro
  1012.         _SGSetOutputFlags
  1013.             dc.w     $2F3C
  1014.             dc.w     $0008
  1015.             dc.w     $0032
  1016.             moveq    #0,d0
  1017.             dc.w     $A82A
  1018.         EndM
  1019.     ELSE
  1020.         IMPORT_CFM_FUNCTION    SGSetOutputFlags
  1021.     ENDIF
  1022.  
  1023. ;
  1024. ; pascal ComponentResult SGSetChannelOutput(SeqGrabComponent s, SGChannel c, SGOutput output)
  1025. ;
  1026.     IF ¬ GENERATINGCFM THEN
  1027.         Macro
  1028.         _SGSetChannelOutput
  1029.             dc.w     $2F3C
  1030.             dc.w     $0008
  1031.             dc.w     $0033
  1032.             moveq    #0,d0
  1033.             dc.w     $A82A
  1034.         EndM
  1035.     ELSE
  1036.         IMPORT_CFM_FUNCTION    SGSetChannelOutput
  1037.     ENDIF
  1038.  
  1039. ;
  1040. ; pascal ComponentResult SGGetDataOutputStorageSpaceRemaining(SeqGrabComponent s, SGOutput output, unsigned long *space)
  1041. ;
  1042.     IF ¬ GENERATINGCFM THEN
  1043.         Macro
  1044.         _SGGetDataOutputStorageSpaceRemaining
  1045.             dc.w     $2F3C
  1046.             dc.w     $0008
  1047.             dc.w     $0034
  1048.             moveq    #0,d0
  1049.             dc.w     $A82A
  1050.         EndM
  1051.     ELSE
  1052.         IMPORT_CFM_FUNCTION    SGGetDataOutputStorageSpaceRemaining
  1053.     ENDIF
  1054.  
  1055. ;
  1056. ;    calls from Channel to seqGrab
  1057. ;
  1058. ;
  1059. ; pascal ComponentResult SGWriteMovieData(SeqGrabComponent s, SGChannel c, Ptr p, long len, long *offset)
  1060. ;
  1061.     IF ¬ GENERATINGCFM THEN
  1062.         Macro
  1063.         _SGWriteMovieData
  1064.             dc.w     $2F3C
  1065.             dc.w     $0010
  1066.             dc.w     $0100
  1067.             moveq    #0,d0
  1068.             dc.w     $A82A
  1069.         EndM
  1070.     ELSE
  1071.         IMPORT_CFM_FUNCTION    SGWriteMovieData
  1072.     ENDIF
  1073.  
  1074. ;
  1075. ; pascal ComponentResult SGAddFrameReference(SeqGrabComponent s, SeqGrabFrameInfoPtr frameInfo)
  1076. ;
  1077.     IF ¬ GENERATINGCFM THEN
  1078.         Macro
  1079.         _SGAddFrameReference
  1080.             dc.w     $2F3C
  1081.             dc.w     $0004
  1082.             dc.w     $0101
  1083.             moveq    #0,d0
  1084.             dc.w     $A82A
  1085.         EndM
  1086.     ELSE
  1087.         IMPORT_CFM_FUNCTION    SGAddFrameReference
  1088.     ENDIF
  1089.  
  1090. ;
  1091. ; pascal ComponentResult SGGetNextFrameReference(SeqGrabComponent s, SeqGrabFrameInfoPtr frameInfo, TimeValue *frameDuration, long *frameNumber)
  1092. ;
  1093.     IF ¬ GENERATINGCFM THEN
  1094.         Macro
  1095.         _SGGetNextFrameReference
  1096.             dc.w     $2F3C
  1097.             dc.w     $000C
  1098.             dc.w     $0102
  1099.             moveq    #0,d0
  1100.             dc.w     $A82A
  1101.         EndM
  1102.     ELSE
  1103.         IMPORT_CFM_FUNCTION    SGGetNextFrameReference
  1104.     ENDIF
  1105.  
  1106. ;
  1107. ; pascal ComponentResult SGGetTimeBase(SeqGrabComponent s, TimeBase *tb)
  1108. ;
  1109.     IF ¬ GENERATINGCFM THEN
  1110.         Macro
  1111.         _SGGetTimeBase
  1112.             dc.w     $2F3C
  1113.             dc.w     $0004
  1114.             dc.w     $0103
  1115.             moveq    #0,d0
  1116.             dc.w     $A82A
  1117.         EndM
  1118.     ELSE
  1119.         IMPORT_CFM_FUNCTION    SGGetTimeBase
  1120.     ENDIF
  1121.  
  1122. ;
  1123. ; pascal ComponentResult SGSortDeviceList(SeqGrabComponent s, SGDeviceList list)
  1124. ;
  1125.     IF ¬ GENERATINGCFM THEN
  1126.         Macro
  1127.         _SGSortDeviceList
  1128.             dc.w     $2F3C
  1129.             dc.w     $0004
  1130.             dc.w     $0104
  1131.             moveq    #0,d0
  1132.             dc.w     $A82A
  1133.         EndM
  1134.     ELSE
  1135.         IMPORT_CFM_FUNCTION    SGSortDeviceList
  1136.     ENDIF
  1137.  
  1138. ;
  1139. ; pascal ComponentResult SGAddMovieData(SeqGrabComponent s, SGChannel c, Ptr p, long len, long *offset, long chRefCon, TimeValue time, short writeType)
  1140. ;
  1141.     IF ¬ GENERATINGCFM THEN
  1142.         Macro
  1143.         _SGAddMovieData
  1144.             dc.w     $2F3C
  1145.             dc.w     $001A
  1146.             dc.w     $0105
  1147.             moveq    #0,d0
  1148.             dc.w     $A82A
  1149.         EndM
  1150.     ELSE
  1151.         IMPORT_CFM_FUNCTION    SGAddMovieData
  1152.     ENDIF
  1153.  
  1154. ;
  1155. ; pascal ComponentResult SGChangedSource(SeqGrabComponent s, SGChannel c)
  1156. ;
  1157.     IF ¬ GENERATINGCFM THEN
  1158.         Macro
  1159.         _SGChangedSource
  1160.             dc.w     $2F3C
  1161.             dc.w     $0004
  1162.             dc.w     $0106
  1163.             moveq    #0,d0
  1164.             dc.w     $A82A
  1165.         EndM
  1166.     ELSE
  1167.         IMPORT_CFM_FUNCTION    SGChangedSource
  1168.     ENDIF
  1169.  
  1170. ;** Sequence Grab CHANNEL Component Stuff **
  1171. ;
  1172. ; pascal ComponentResult SGSetChannelUsage(SGChannel c, long usage)
  1173. ;
  1174.     IF ¬ GENERATINGCFM THEN
  1175.         Macro
  1176.         _SGSetChannelUsage
  1177.             dc.w     $2F3C
  1178.             dc.w     $0004
  1179.             dc.w     $0080
  1180.             moveq    #0,d0
  1181.             dc.w     $A82A
  1182.         EndM
  1183.     ELSE
  1184.         IMPORT_CFM_FUNCTION    SGSetChannelUsage
  1185.     ENDIF
  1186.  
  1187. ;
  1188. ; pascal ComponentResult SGGetChannelUsage(SGChannel c, long *usage)
  1189. ;
  1190.     IF ¬ GENERATINGCFM THEN
  1191.         Macro
  1192.         _SGGetChannelUsage
  1193.             dc.w     $2F3C
  1194.             dc.w     $0004
  1195.             dc.w     $0081
  1196.             moveq    #0,d0
  1197.             dc.w     $A82A
  1198.         EndM
  1199.     ELSE
  1200.         IMPORT_CFM_FUNCTION    SGGetChannelUsage
  1201.     ENDIF
  1202.  
  1203. ;
  1204. ; pascal ComponentResult SGSetChannelBounds(SGChannel c, const Rect *bounds)
  1205. ;
  1206.     IF ¬ GENERATINGCFM THEN
  1207.         Macro
  1208.         _SGSetChannelBounds
  1209.             dc.w     $2F3C
  1210.             dc.w     $0004
  1211.             dc.w     $0082
  1212.             moveq    #0,d0
  1213.             dc.w     $A82A
  1214.         EndM
  1215.     ELSE
  1216.         IMPORT_CFM_FUNCTION    SGSetChannelBounds
  1217.     ENDIF
  1218.  
  1219. ;
  1220. ; pascal ComponentResult SGGetChannelBounds(SGChannel c, Rect *bounds)
  1221. ;
  1222.     IF ¬ GENERATINGCFM THEN
  1223.         Macro
  1224.         _SGGetChannelBounds
  1225.             dc.w     $2F3C
  1226.             dc.w     $0004
  1227.             dc.w     $0083
  1228.             moveq    #0,d0
  1229.             dc.w     $A82A
  1230.         EndM
  1231.     ELSE
  1232.         IMPORT_CFM_FUNCTION    SGGetChannelBounds
  1233.     ENDIF
  1234.  
  1235. ;
  1236. ; pascal ComponentResult SGSetChannelVolume(SGChannel c, short volume)
  1237. ;
  1238.     IF ¬ GENERATINGCFM THEN
  1239.         Macro
  1240.         _SGSetChannelVolume
  1241.             dc.w     $2F3C
  1242.             dc.w     $0002
  1243.             dc.w     $0084
  1244.             moveq    #0,d0
  1245.             dc.w     $A82A
  1246.         EndM
  1247.     ELSE
  1248.         IMPORT_CFM_FUNCTION    SGSetChannelVolume
  1249.     ENDIF
  1250.  
  1251. ;
  1252. ; pascal ComponentResult SGGetChannelVolume(SGChannel c, short *volume)
  1253. ;
  1254.     IF ¬ GENERATINGCFM THEN
  1255.         Macro
  1256.         _SGGetChannelVolume
  1257.             dc.w     $2F3C
  1258.             dc.w     $0004
  1259.             dc.w     $0085
  1260.             moveq    #0,d0
  1261.             dc.w     $A82A
  1262.         EndM
  1263.     ELSE
  1264.         IMPORT_CFM_FUNCTION    SGGetChannelVolume
  1265.     ENDIF
  1266.  
  1267. ;
  1268. ; pascal ComponentResult SGGetChannelInfo(SGChannel c, long *channelInfo)
  1269. ;
  1270.     IF ¬ GENERATINGCFM THEN
  1271.         Macro
  1272.         _SGGetChannelInfo
  1273.             dc.w     $2F3C
  1274.             dc.w     $0004
  1275.             dc.w     $0086
  1276.             moveq    #0,d0
  1277.             dc.w     $A82A
  1278.         EndM
  1279.     ELSE
  1280.         IMPORT_CFM_FUNCTION    SGGetChannelInfo
  1281.     ENDIF
  1282.  
  1283. ;
  1284. ; pascal ComponentResult SGSetChannelPlayFlags(SGChannel c, long playFlags)
  1285. ;
  1286.     IF ¬ GENERATINGCFM THEN
  1287.         Macro
  1288.         _SGSetChannelPlayFlags
  1289.             dc.w     $2F3C
  1290.             dc.w     $0004
  1291.             dc.w     $0087
  1292.             moveq    #0,d0
  1293.             dc.w     $A82A
  1294.         EndM
  1295.     ELSE
  1296.         IMPORT_CFM_FUNCTION    SGSetChannelPlayFlags
  1297.     ENDIF
  1298.  
  1299. ;
  1300. ; pascal ComponentResult SGGetChannelPlayFlags(SGChannel c, long *playFlags)
  1301. ;
  1302.     IF ¬ GENERATINGCFM THEN
  1303.         Macro
  1304.         _SGGetChannelPlayFlags
  1305.             dc.w     $2F3C
  1306.             dc.w     $0004
  1307.             dc.w     $0088
  1308.             moveq    #0,d0
  1309.             dc.w     $A82A
  1310.         EndM
  1311.     ELSE
  1312.         IMPORT_CFM_FUNCTION    SGGetChannelPlayFlags
  1313.     ENDIF
  1314.  
  1315. ;
  1316. ; pascal ComponentResult SGSetChannelMaxFrames(SGChannel c, long frameCount)
  1317. ;
  1318.     IF ¬ GENERATINGCFM THEN
  1319.         Macro
  1320.         _SGSetChannelMaxFrames
  1321.             dc.w     $2F3C
  1322.             dc.w     $0004
  1323.             dc.w     $0089
  1324.             moveq    #0,d0
  1325.             dc.w     $A82A
  1326.         EndM
  1327.     ELSE
  1328.         IMPORT_CFM_FUNCTION    SGSetChannelMaxFrames
  1329.     ENDIF
  1330.  
  1331. ;
  1332. ; pascal ComponentResult SGGetChannelMaxFrames(SGChannel c, long *frameCount)
  1333. ;
  1334.     IF ¬ GENERATINGCFM THEN
  1335.         Macro
  1336.         _SGGetChannelMaxFrames
  1337.             dc.w     $2F3C
  1338.             dc.w     $0004
  1339.             dc.w     $008A
  1340.             moveq    #0,d0
  1341.             dc.w     $A82A
  1342.         EndM
  1343.     ELSE
  1344.         IMPORT_CFM_FUNCTION    SGGetChannelMaxFrames
  1345.     ENDIF
  1346.  
  1347. ;
  1348. ; pascal ComponentResult SGSetChannelRefCon(SGChannel c, long refCon)
  1349. ;
  1350.     IF ¬ GENERATINGCFM THEN
  1351.         Macro
  1352.         _SGSetChannelRefCon
  1353.             dc.w     $2F3C
  1354.             dc.w     $0004
  1355.             dc.w     $008B
  1356.             moveq    #0,d0
  1357.             dc.w     $A82A
  1358.         EndM
  1359.     ELSE
  1360.         IMPORT_CFM_FUNCTION    SGSetChannelRefCon
  1361.     ENDIF
  1362.  
  1363. ;
  1364. ; pascal ComponentResult SGSetChannelClip(SGChannel c, RgnHandle theClip)
  1365. ;
  1366.     IF ¬ GENERATINGCFM THEN
  1367.         Macro
  1368.         _SGSetChannelClip
  1369.             dc.w     $2F3C
  1370.             dc.w     $0004
  1371.             dc.w     $008C
  1372.             moveq    #0,d0
  1373.             dc.w     $A82A
  1374.         EndM
  1375.     ELSE
  1376.         IMPORT_CFM_FUNCTION    SGSetChannelClip
  1377.     ENDIF
  1378.  
  1379. ;
  1380. ; pascal ComponentResult SGGetChannelClip(SGChannel c, RgnHandle *theClip)
  1381. ;
  1382.     IF ¬ GENERATINGCFM THEN
  1383.         Macro
  1384.         _SGGetChannelClip
  1385.             dc.w     $2F3C
  1386.             dc.w     $0004
  1387.             dc.w     $008D
  1388.             moveq    #0,d0
  1389.             dc.w     $A82A
  1390.         EndM
  1391.     ELSE
  1392.         IMPORT_CFM_FUNCTION    SGGetChannelClip
  1393.     ENDIF
  1394.  
  1395. ;
  1396. ; pascal ComponentResult SGGetChannelSampleDescription(SGChannel c, Handle sampleDesc)
  1397. ;
  1398.     IF ¬ GENERATINGCFM THEN
  1399.         Macro
  1400.         _SGGetChannelSampleDescription
  1401.             dc.w     $2F3C
  1402.             dc.w     $0004
  1403.             dc.w     $008E
  1404.             moveq    #0,d0
  1405.             dc.w     $A82A
  1406.         EndM
  1407.     ELSE
  1408.         IMPORT_CFM_FUNCTION    SGGetChannelSampleDescription
  1409.     ENDIF
  1410.  
  1411. ;
  1412. ; pascal ComponentResult SGGetChannelDeviceList(SGChannel c, long selectionFlags, SGDeviceList *list)
  1413. ;
  1414.     IF ¬ GENERATINGCFM THEN
  1415.         Macro
  1416.         _SGGetChannelDeviceList
  1417.             dc.w     $2F3C
  1418.             dc.w     $0008
  1419.             dc.w     $008F
  1420.             moveq    #0,d0
  1421.             dc.w     $A82A
  1422.         EndM
  1423.     ELSE
  1424.         IMPORT_CFM_FUNCTION    SGGetChannelDeviceList
  1425.     ENDIF
  1426.  
  1427. ;
  1428. ; pascal ComponentResult SGSetChannelDevice(SGChannel c, StringPtr name)
  1429. ;
  1430.     IF ¬ GENERATINGCFM THEN
  1431.         Macro
  1432.         _SGSetChannelDevice
  1433.             dc.w     $2F3C
  1434.             dc.w     $0004
  1435.             dc.w     $0090
  1436.             moveq    #0,d0
  1437.             dc.w     $A82A
  1438.         EndM
  1439.     ELSE
  1440.         IMPORT_CFM_FUNCTION    SGSetChannelDevice
  1441.     ENDIF
  1442.  
  1443. ;
  1444. ; pascal ComponentResult SGSetChannelMatrix(SGChannel c, const MatrixRecord *m)
  1445. ;
  1446.     IF ¬ GENERATINGCFM THEN
  1447.         Macro
  1448.         _SGSetChannelMatrix
  1449.             dc.w     $2F3C
  1450.             dc.w     $0004
  1451.             dc.w     $0091
  1452.             moveq    #0,d0
  1453.             dc.w     $A82A
  1454.         EndM
  1455.     ELSE
  1456.         IMPORT_CFM_FUNCTION    SGSetChannelMatrix
  1457.     ENDIF
  1458.  
  1459. ;
  1460. ; pascal ComponentResult SGGetChannelMatrix(SGChannel c, MatrixRecord *m)
  1461. ;
  1462.     IF ¬ GENERATINGCFM THEN
  1463.         Macro
  1464.         _SGGetChannelMatrix
  1465.             dc.w     $2F3C
  1466.             dc.w     $0004
  1467.             dc.w     $0092
  1468.             moveq    #0,d0
  1469.             dc.w     $A82A
  1470.         EndM
  1471.     ELSE
  1472.         IMPORT_CFM_FUNCTION    SGGetChannelMatrix
  1473.     ENDIF
  1474.  
  1475. ;
  1476. ; pascal ComponentResult SGGetChannelTimeScale(SGChannel c, TimeScale *scale)
  1477. ;
  1478.     IF ¬ GENERATINGCFM THEN
  1479.         Macro
  1480.         _SGGetChannelTimeScale
  1481.             dc.w     $2F3C
  1482.             dc.w     $0004
  1483.             dc.w     $0093
  1484.             moveq    #0,d0
  1485.             dc.w     $A82A
  1486.         EndM
  1487.     ELSE
  1488.         IMPORT_CFM_FUNCTION    SGGetChannelTimeScale
  1489.     ENDIF
  1490.  
  1491. ;
  1492. ; pascal ComponentResult SGChannelPutPicture(SGChannel c)
  1493. ;
  1494.     IF ¬ GENERATINGCFM THEN
  1495.         Macro
  1496.         _SGChannelPutPicture
  1497.             dc.w     $2F3C
  1498.             dc.w     $0000
  1499.             dc.w     $0094
  1500.             moveq    #0,d0
  1501.             dc.w     $A82A
  1502.         EndM
  1503.     ELSE
  1504.         IMPORT_CFM_FUNCTION    SGChannelPutPicture
  1505.     ENDIF
  1506.  
  1507. ;
  1508. ; pascal ComponentResult SGChannelSetRequestedDataRate(SGChannel c, long bytesPerSecond)
  1509. ;
  1510.     IF ¬ GENERATINGCFM THEN
  1511.         Macro
  1512.         _SGChannelSetRequestedDataRate
  1513.             dc.w     $2F3C
  1514.             dc.w     $0004
  1515.             dc.w     $0095
  1516.             moveq    #0,d0
  1517.             dc.w     $A82A
  1518.         EndM
  1519.     ELSE
  1520.         IMPORT_CFM_FUNCTION    SGChannelSetRequestedDataRate
  1521.     ENDIF
  1522.  
  1523. ;
  1524. ; pascal ComponentResult SGChannelGetRequestedDataRate(SGChannel c, long *bytesPerSecond)
  1525. ;
  1526.     IF ¬ GENERATINGCFM THEN
  1527.         Macro
  1528.         _SGChannelGetRequestedDataRate
  1529.             dc.w     $2F3C
  1530.             dc.w     $0004
  1531.             dc.w     $0096
  1532.             moveq    #0,d0
  1533.             dc.w     $A82A
  1534.         EndM
  1535.     ELSE
  1536.         IMPORT_CFM_FUNCTION    SGChannelGetRequestedDataRate
  1537.     ENDIF
  1538.  
  1539. ;
  1540. ; pascal ComponentResult SGChannelSetDataSourceName(SGChannel c, ConstStr255Param name, ScriptCode scriptTag)
  1541. ;
  1542.     IF ¬ GENERATINGCFM THEN
  1543.         Macro
  1544.         _SGChannelSetDataSourceName
  1545.             dc.w     $2F3C
  1546.             dc.w     $0006
  1547.             dc.w     $0097
  1548.             moveq    #0,d0
  1549.             dc.w     $A82A
  1550.         EndM
  1551.     ELSE
  1552.         IMPORT_CFM_FUNCTION    SGChannelSetDataSourceName
  1553.     ENDIF
  1554.  
  1555. ;
  1556. ; pascal ComponentResult SGChannelGetDataSourceName(SGChannel c, Str255 name, ScriptCode *scriptTag)
  1557. ;
  1558.     IF ¬ GENERATINGCFM THEN
  1559.         Macro
  1560.         _SGChannelGetDataSourceName
  1561.             dc.w     $2F3C
  1562.             dc.w     $0008
  1563.             dc.w     $0098
  1564.             moveq    #0,d0
  1565.             dc.w     $A82A
  1566.         EndM
  1567.     ELSE
  1568.         IMPORT_CFM_FUNCTION    SGChannelGetDataSourceName
  1569.     ENDIF
  1570.  
  1571. ;
  1572. ;    calls from seqGrab to Channel
  1573. ;
  1574. ;
  1575. ; pascal ComponentResult SGInitChannel(SGChannel c, SeqGrabComponent owner)
  1576. ;
  1577.     IF ¬ GENERATINGCFM THEN
  1578.         Macro
  1579.         _SGInitChannel
  1580.             dc.w     $2F3C
  1581.             dc.w     $0004
  1582.             dc.w     $0180
  1583.             moveq    #0,d0
  1584.             dc.w     $A82A
  1585.         EndM
  1586.     ELSE
  1587.         IMPORT_CFM_FUNCTION    SGInitChannel
  1588.     ENDIF
  1589.  
  1590. ;
  1591. ; pascal ComponentResult SGWriteSamples(SGChannel c, Movie m, AliasHandle theFile)
  1592. ;
  1593.     IF ¬ GENERATINGCFM THEN
  1594.         Macro
  1595.         _SGWriteSamples
  1596.             dc.w     $2F3C
  1597.             dc.w     $0008
  1598.             dc.w     $0181
  1599.             moveq    #0,d0
  1600.             dc.w     $A82A
  1601.         EndM
  1602.     ELSE
  1603.         IMPORT_CFM_FUNCTION    SGWriteSamples
  1604.     ENDIF
  1605.  
  1606. ;
  1607. ; pascal ComponentResult SGGetDataRate(SGChannel c, long *bytesPerSecond)
  1608. ;
  1609.     IF ¬ GENERATINGCFM THEN
  1610.         Macro
  1611.         _SGGetDataRate
  1612.             dc.w     $2F3C
  1613.             dc.w     $0004
  1614.             dc.w     $0182
  1615.             moveq    #0,d0
  1616.             dc.w     $A82A
  1617.         EndM
  1618.     ELSE
  1619.         IMPORT_CFM_FUNCTION    SGGetDataRate
  1620.     ENDIF
  1621.  
  1622. ;
  1623. ; pascal ComponentResult SGAlignChannelRect(SGChannel c, Rect *r)
  1624. ;
  1625.     IF ¬ GENERATINGCFM THEN
  1626.         Macro
  1627.         _SGAlignChannelRect
  1628.             dc.w     $2F3C
  1629.             dc.w     $0004
  1630.             dc.w     $0183
  1631.             moveq    #0,d0
  1632.             dc.w     $A82A
  1633.         EndM
  1634.     ELSE
  1635.         IMPORT_CFM_FUNCTION    SGAlignChannelRect
  1636.     ENDIF
  1637.  
  1638. ;
  1639. ;    Dorky dialog panel calls
  1640. ;
  1641. ;
  1642. ; pascal ComponentResult SGPanelGetDitl(SeqGrabComponent s, Handle *ditl)
  1643. ;
  1644.     IF ¬ GENERATINGCFM THEN
  1645.         Macro
  1646.         _SGPanelGetDitl
  1647.             dc.w     $2F3C
  1648.             dc.w     $0004
  1649.             dc.w     $0200
  1650.             moveq    #0,d0
  1651.             dc.w     $A82A
  1652.         EndM
  1653.     ELSE
  1654.         IMPORT_CFM_FUNCTION    SGPanelGetDitl
  1655.     ENDIF
  1656.  
  1657. ;
  1658. ; pascal ComponentResult SGPanelGetTitle(SeqGrabComponent s, Str255 title)
  1659. ;
  1660.     IF ¬ GENERATINGCFM THEN
  1661.         Macro
  1662.         _SGPanelGetTitle
  1663.             dc.w     $2F3C
  1664.             dc.w     $0004
  1665.             dc.w     $0201
  1666.             moveq    #0,d0
  1667.             dc.w     $A82A
  1668.         EndM
  1669.     ELSE
  1670.         IMPORT_CFM_FUNCTION    SGPanelGetTitle
  1671.     ENDIF
  1672.  
  1673. ;
  1674. ; pascal ComponentResult SGPanelCanRun(SeqGrabComponent s, SGChannel c)
  1675. ;
  1676.     IF ¬ GENERATINGCFM THEN
  1677.         Macro
  1678.         _SGPanelCanRun
  1679.             dc.w     $2F3C
  1680.             dc.w     $0004
  1681.             dc.w     $0202
  1682.             moveq    #0,d0
  1683.             dc.w     $A82A
  1684.         EndM
  1685.     ELSE
  1686.         IMPORT_CFM_FUNCTION    SGPanelCanRun
  1687.     ENDIF
  1688.  
  1689. ;
  1690. ; pascal ComponentResult SGPanelInstall(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset)
  1691. ;
  1692.     IF ¬ GENERATINGCFM THEN
  1693.         Macro
  1694.         _SGPanelInstall
  1695.             dc.w     $2F3C
  1696.             dc.w     $000A
  1697.             dc.w     $0203
  1698.             moveq    #0,d0
  1699.             dc.w     $A82A
  1700.         EndM
  1701.     ELSE
  1702.         IMPORT_CFM_FUNCTION    SGPanelInstall
  1703.     ENDIF
  1704.  
  1705. ;
  1706. ; pascal ComponentResult SGPanelEvent(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset, EventRecord *theEvent, short *itemHit, Boolean *handled)
  1707. ;
  1708.     IF ¬ GENERATINGCFM THEN
  1709.         Macro
  1710.         _SGPanelEvent
  1711.             dc.w     $2F3C
  1712.             dc.w     $0016
  1713.             dc.w     $0204
  1714.             moveq    #0,d0
  1715.             dc.w     $A82A
  1716.         EndM
  1717.     ELSE
  1718.         IMPORT_CFM_FUNCTION    SGPanelEvent
  1719.     ENDIF
  1720.  
  1721. ;
  1722. ; pascal ComponentResult SGPanelItem(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset, short itemNum)
  1723. ;
  1724.     IF ¬ GENERATINGCFM THEN
  1725.         Macro
  1726.         _SGPanelItem
  1727.             dc.w     $2F3C
  1728.             dc.w     $000C
  1729.             dc.w     $0205
  1730.             moveq    #0,d0
  1731.             dc.w     $A82A
  1732.         EndM
  1733.     ELSE
  1734.         IMPORT_CFM_FUNCTION    SGPanelItem
  1735.     ENDIF
  1736.  
  1737. ;
  1738. ; pascal ComponentResult SGPanelRemove(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset)
  1739. ;
  1740.     IF ¬ GENERATINGCFM THEN
  1741.         Macro
  1742.         _SGPanelRemove
  1743.             dc.w     $2F3C
  1744.             dc.w     $000A
  1745.             dc.w     $0206
  1746.             moveq    #0,d0
  1747.             dc.w     $A82A
  1748.         EndM
  1749.     ELSE
  1750.         IMPORT_CFM_FUNCTION    SGPanelRemove
  1751.     ENDIF
  1752.  
  1753. ;
  1754. ; pascal ComponentResult SGPanelSetGrabber(SeqGrabComponent s, SeqGrabComponent sg)
  1755. ;
  1756.     IF ¬ GENERATINGCFM THEN
  1757.         Macro
  1758.         _SGPanelSetGrabber
  1759.             dc.w     $2F3C
  1760.             dc.w     $0004
  1761.             dc.w     $0207
  1762.             moveq    #0,d0
  1763.             dc.w     $A82A
  1764.         EndM
  1765.     ELSE
  1766.         IMPORT_CFM_FUNCTION    SGPanelSetGrabber
  1767.     ENDIF
  1768.  
  1769. ;
  1770. ; pascal ComponentResult SGPanelSetResFile(SeqGrabComponent s, short resRef)
  1771. ;
  1772.     IF ¬ GENERATINGCFM THEN
  1773.         Macro
  1774.         _SGPanelSetResFile
  1775.             dc.w     $2F3C
  1776.             dc.w     $0002
  1777.             dc.w     $0208
  1778.             moveq    #0,d0
  1779.             dc.w     $A82A
  1780.         EndM
  1781.     ELSE
  1782.         IMPORT_CFM_FUNCTION    SGPanelSetResFile
  1783.     ENDIF
  1784.  
  1785. ;
  1786. ; pascal ComponentResult SGPanelGetSettings(SeqGrabComponent s, SGChannel c, UserData *ud, long flags)
  1787. ;
  1788.     IF ¬ GENERATINGCFM THEN
  1789.         Macro
  1790.         _SGPanelGetSettings
  1791.             dc.w     $2F3C
  1792.             dc.w     $000C
  1793.             dc.w     $0209
  1794.             moveq    #0,d0
  1795.             dc.w     $A82A
  1796.         EndM
  1797.     ELSE
  1798.         IMPORT_CFM_FUNCTION    SGPanelGetSettings
  1799.     ENDIF
  1800.  
  1801. ;
  1802. ; pascal ComponentResult SGPanelSetSettings(SeqGrabComponent s, SGChannel c, UserData ud, long flags)
  1803. ;
  1804.     IF ¬ GENERATINGCFM THEN
  1805.         Macro
  1806.         _SGPanelSetSettings
  1807.             dc.w     $2F3C
  1808.             dc.w     $000C
  1809.             dc.w     $020A
  1810.             moveq    #0,d0
  1811.             dc.w     $A82A
  1812.         EndM
  1813.     ELSE
  1814.         IMPORT_CFM_FUNCTION    SGPanelSetSettings
  1815.     ENDIF
  1816.  
  1817. ;
  1818. ; pascal ComponentResult SGPanelValidateInput(SeqGrabComponent s, Boolean *ok)
  1819. ;
  1820.     IF ¬ GENERATINGCFM THEN
  1821.         Macro
  1822.         _SGPanelValidateInput
  1823.             dc.w     $2F3C
  1824.             dc.w     $0004
  1825.             dc.w     $020B
  1826.             moveq    #0,d0
  1827.             dc.w     $A82A
  1828.         EndM
  1829.     ELSE
  1830.         IMPORT_CFM_FUNCTION    SGPanelValidateInput
  1831.     ENDIF
  1832.  
  1833. ;
  1834. ; pascal ComponentResult SGPanelSetEventFilter(SeqGrabComponent s, SGModalFilterUPP proc, long refCon)
  1835. ;
  1836.     IF ¬ GENERATINGCFM THEN
  1837.         Macro
  1838.         _SGPanelSetEventFilter
  1839.             dc.w     $2F3C
  1840.             dc.w     $0008
  1841.             dc.w     $020C
  1842.             moveq    #0,d0
  1843.             dc.w     $A82A
  1844.         EndM
  1845.     ELSE
  1846.         IMPORT_CFM_FUNCTION    SGPanelSetEventFilter
  1847.     ENDIF
  1848.  
  1849. ;** Sequence Grab VIDEO CHANNEL Component Stuff **
  1850. ;
  1851. ;    Video stuff
  1852. ;
  1853. SGCompressInfo             RECORD    0
  1854. buffer                     ds.l   1        ; offset: $0 (0)
  1855. bufferSize                 ds.l   1        ; offset: $4 (4)
  1856. similarity                 ds.b   1        ; offset: $8 (8)
  1857. reserved                 ds.b   1        ; offset: $9 (9)
  1858. sizeof                     EQU *            ; size:   $A (10)
  1859.                         ENDR
  1860.  
  1861. ; typedef struct SGCompressInfo  SGCompressInfo
  1862. VideoBottles             RECORD    0
  1863. procCount                 ds.w   1        ; offset: $0 (0)
  1864. grabProc                 ds.l   1        ; offset: $2 (2)
  1865. grabCompleteProc         ds.l   1        ; offset: $6 (6)
  1866. displayProc                 ds.l   1        ; offset: $A (10)
  1867. compressProc             ds.l   1        ; offset: $E (14)
  1868. compressCompleteProc     ds.l   1        ; offset: $12 (18)
  1869. addFrameProc             ds.l   1        ; offset: $16 (22)
  1870. transferFrameProc         ds.l   1        ; offset: $1A (26)
  1871. grabCompressCompleteProc ds.l   1        ; offset: $1E (30)
  1872. displayCompressProc         ds.l   1        ; offset: $22 (34)
  1873. sizeof                     EQU *            ; size:   $26 (38)
  1874.                         ENDR
  1875.  
  1876. ; typedef struct VideoBottles  VideoBottles
  1877. ;
  1878. ; pascal ComponentResult SGGetSrcVideoBounds(SGChannel c, Rect *r)
  1879. ;
  1880.     IF ¬ GENERATINGCFM THEN
  1881.         Macro
  1882.         _SGGetSrcVideoBounds
  1883.             dc.w     $2F3C
  1884.             dc.w     $0004
  1885.             dc.w     $0100
  1886.             moveq    #0,d0
  1887.             dc.w     $A82A
  1888.         EndM
  1889.     ELSE
  1890.         IMPORT_CFM_FUNCTION    SGGetSrcVideoBounds
  1891.     ENDIF
  1892.  
  1893. ;
  1894. ; pascal ComponentResult SGSetVideoRect(SGChannel c, const Rect *r)
  1895. ;
  1896.     IF ¬ GENERATINGCFM THEN
  1897.         Macro
  1898.         _SGSetVideoRect
  1899.             dc.w     $2F3C
  1900.             dc.w     $0004
  1901.             dc.w     $0101
  1902.             moveq    #0,d0
  1903.             dc.w     $A82A
  1904.         EndM
  1905.     ELSE
  1906.         IMPORT_CFM_FUNCTION    SGSetVideoRect
  1907.     ENDIF
  1908.  
  1909. ;
  1910. ; pascal ComponentResult SGGetVideoRect(SGChannel c, Rect *r)
  1911. ;
  1912.     IF ¬ GENERATINGCFM THEN
  1913.         Macro
  1914.         _SGGetVideoRect
  1915.             dc.w     $2F3C
  1916.             dc.w     $0004
  1917.             dc.w     $0102
  1918.             moveq    #0,d0
  1919.             dc.w     $A82A
  1920.         EndM
  1921.     ELSE
  1922.         IMPORT_CFM_FUNCTION    SGGetVideoRect
  1923.     ENDIF
  1924.  
  1925. ;
  1926. ; pascal ComponentResult SGGetVideoCompressorType(SGChannel c, OSType *compressorType)
  1927. ;
  1928.     IF ¬ GENERATINGCFM THEN
  1929.         Macro
  1930.         _SGGetVideoCompressorType
  1931.             dc.w     $2F3C
  1932.             dc.w     $0004
  1933.             dc.w     $0103
  1934.             moveq    #0,d0
  1935.             dc.w     $A82A
  1936.         EndM
  1937.     ELSE
  1938.         IMPORT_CFM_FUNCTION    SGGetVideoCompressorType
  1939.     ENDIF
  1940.  
  1941. ;
  1942. ; pascal ComponentResult SGSetVideoCompressorType(SGChannel c, OSType compressorType)
  1943. ;
  1944.     IF ¬ GENERATINGCFM THEN
  1945.         Macro
  1946.         _SGSetVideoCompressorType
  1947.             dc.w     $2F3C
  1948.             dc.w     $0004
  1949.             dc.w     $0104
  1950.             moveq    #0,d0
  1951.             dc.w     $A82A
  1952.         EndM
  1953.     ELSE
  1954.         IMPORT_CFM_FUNCTION    SGSetVideoCompressorType
  1955.     ENDIF
  1956.  
  1957. ;
  1958. ; pascal ComponentResult SGSetVideoCompressor(SGChannel c, short depth, CompressorComponent compressor, CodecQ spatialQuality, CodecQ temporalQuality, long keyFrameRate)
  1959. ;
  1960.     IF ¬ GENERATINGCFM THEN
  1961.         Macro
  1962.         _SGSetVideoCompressor
  1963.             dc.w     $2F3C
  1964.             dc.w     $0012
  1965.             dc.w     $0105
  1966.             moveq    #0,d0
  1967.             dc.w     $A82A
  1968.         EndM
  1969.     ELSE
  1970.         IMPORT_CFM_FUNCTION    SGSetVideoCompressor
  1971.     ENDIF
  1972.  
  1973. ;
  1974. ; pascal ComponentResult SGGetVideoCompressor(SGChannel c, short *depth, CompressorComponent *compressor, CodecQ *spatialQuality, CodecQ *temporalQuality, long *keyFrameRate)
  1975. ;
  1976.     IF ¬ GENERATINGCFM THEN
  1977.         Macro
  1978.         _SGGetVideoCompressor
  1979.             dc.w     $2F3C
  1980.             dc.w     $0014
  1981.             dc.w     $0106
  1982.             moveq    #0,d0
  1983.             dc.w     $A82A
  1984.         EndM
  1985.     ELSE
  1986.         IMPORT_CFM_FUNCTION    SGGetVideoCompressor
  1987.     ENDIF
  1988.  
  1989. ;
  1990. ; pascal ComponentInstance SGGetVideoDigitizerComponent(SGChannel c)
  1991. ;
  1992.     IF ¬ GENERATINGCFM THEN
  1993.         Macro
  1994.         _SGGetVideoDigitizerComponent
  1995.             dc.w     $2F3C
  1996.             dc.w     $0000
  1997.             dc.w     $0107
  1998.             moveq    #0,d0
  1999.             dc.w     $A82A
  2000.         EndM
  2001.     ELSE
  2002.         IMPORT_CFM_FUNCTION    SGGetVideoDigitizerComponent
  2003.     ENDIF
  2004.  
  2005. ;
  2006. ; pascal ComponentResult SGSetVideoDigitizerComponent(SGChannel c, ComponentInstance vdig)
  2007. ;
  2008.     IF ¬ GENERATINGCFM THEN
  2009.         Macro
  2010.         _SGSetVideoDigitizerComponent
  2011.             dc.w     $2F3C
  2012.             dc.w     $0004
  2013.             dc.w     $0108
  2014.             moveq    #0,d0
  2015.             dc.w     $A82A
  2016.         EndM
  2017.     ELSE
  2018.         IMPORT_CFM_FUNCTION    SGSetVideoDigitizerComponent
  2019.     ENDIF
  2020.  
  2021. ;
  2022. ; pascal ComponentResult SGVideoDigitizerChanged(SGChannel c)
  2023. ;
  2024.     IF ¬ GENERATINGCFM THEN
  2025.         Macro
  2026.         _SGVideoDigitizerChanged
  2027.             dc.w     $2F3C
  2028.             dc.w     $0000
  2029.             dc.w     $0109
  2030.             moveq    #0,d0
  2031.             dc.w     $A82A
  2032.         EndM
  2033.     ELSE
  2034.         IMPORT_CFM_FUNCTION    SGVideoDigitizerChanged
  2035.     ENDIF
  2036.  
  2037. ;
  2038. ; pascal ComponentResult SGSetVideoBottlenecks(SGChannel c, VideoBottles *vb)
  2039. ;
  2040.     IF ¬ GENERATINGCFM THEN
  2041.         Macro
  2042.         _SGSetVideoBottlenecks
  2043.             dc.w     $2F3C
  2044.             dc.w     $0004
  2045.             dc.w     $010A
  2046.             moveq    #0,d0
  2047.             dc.w     $A82A
  2048.         EndM
  2049.     ELSE
  2050.         IMPORT_CFM_FUNCTION    SGSetVideoBottlenecks
  2051.     ENDIF
  2052.  
  2053. ;
  2054. ; pascal ComponentResult SGGetVideoBottlenecks(SGChannel c, VideoBottles *vb)
  2055. ;
  2056.     IF ¬ GENERATINGCFM THEN
  2057.         Macro
  2058.         _SGGetVideoBottlenecks
  2059.             dc.w     $2F3C
  2060.             dc.w     $0004
  2061.             dc.w     $010B
  2062.             moveq    #0,d0
  2063.             dc.w     $A82A
  2064.         EndM
  2065.     ELSE
  2066.         IMPORT_CFM_FUNCTION    SGGetVideoBottlenecks
  2067.     ENDIF
  2068.  
  2069. ;
  2070. ; pascal ComponentResult SGGrabFrame(SGChannel c, short bufferNum)
  2071. ;
  2072.     IF ¬ GENERATINGCFM THEN
  2073.         Macro
  2074.         _SGGrabFrame
  2075.             dc.w     $2F3C
  2076.             dc.w     $0002
  2077.             dc.w     $010C
  2078.             moveq    #0,d0
  2079.             dc.w     $A82A
  2080.         EndM
  2081.     ELSE
  2082.         IMPORT_CFM_FUNCTION    SGGrabFrame
  2083.     ENDIF
  2084.  
  2085. ;
  2086. ; pascal ComponentResult SGGrabFrameComplete(SGChannel c, short bufferNum, Boolean *done)
  2087. ;
  2088.     IF ¬ GENERATINGCFM THEN
  2089.         Macro
  2090.         _SGGrabFrameComplete
  2091.             dc.w     $2F3C
  2092.             dc.w     $0006
  2093.             dc.w     $010D
  2094.             moveq    #0,d0
  2095.             dc.w     $A82A
  2096.         EndM
  2097.     ELSE
  2098.         IMPORT_CFM_FUNCTION    SGGrabFrameComplete
  2099.     ENDIF
  2100.  
  2101. ;
  2102. ; pascal ComponentResult SGDisplayFrame(SGChannel c, short bufferNum, const MatrixRecord *mp, RgnHandle clipRgn)
  2103. ;
  2104.     IF ¬ GENERATINGCFM THEN
  2105.         Macro
  2106.         _SGDisplayFrame
  2107.             dc.w     $2F3C
  2108.             dc.w     $000A
  2109.             dc.w     $010E
  2110.             moveq    #0,d0
  2111.             dc.w     $A82A
  2112.         EndM
  2113.     ELSE
  2114.         IMPORT_CFM_FUNCTION    SGDisplayFrame
  2115.     ENDIF
  2116.  
  2117. ;
  2118. ; pascal ComponentResult SGCompressFrame(SGChannel c, short bufferNum)
  2119. ;
  2120.     IF ¬ GENERATINGCFM THEN
  2121.         Macro
  2122.         _SGCompressFrame
  2123.             dc.w     $2F3C
  2124.             dc.w     $0002
  2125.             dc.w     $010F
  2126.             moveq    #0,d0
  2127.             dc.w     $A82A
  2128.         EndM
  2129.     ELSE
  2130.         IMPORT_CFM_FUNCTION    SGCompressFrame
  2131.     ENDIF
  2132.  
  2133. ;
  2134. ; pascal ComponentResult SGCompressFrameComplete(SGChannel c, short bufferNum, Boolean *done, SGCompressInfo *ci)
  2135. ;
  2136.     IF ¬ GENERATINGCFM THEN
  2137.         Macro
  2138.         _SGCompressFrameComplete
  2139.             dc.w     $2F3C
  2140.             dc.w     $000A
  2141.             dc.w     $0110
  2142.             moveq    #0,d0
  2143.             dc.w     $A82A
  2144.         EndM
  2145.     ELSE
  2146.         IMPORT_CFM_FUNCTION    SGCompressFrameComplete
  2147.     ENDIF
  2148.  
  2149. ;
  2150. ; pascal ComponentResult SGAddFrame(SGChannel c, short bufferNum, TimeValue atTime, TimeScale scale, const SGCompressInfo *ci)
  2151. ;
  2152.     IF ¬ GENERATINGCFM THEN
  2153.         Macro
  2154.         _SGAddFrame
  2155.             dc.w     $2F3C
  2156.             dc.w     $000E
  2157.             dc.w     $0111
  2158.             moveq    #0,d0
  2159.             dc.w     $A82A
  2160.         EndM
  2161.     ELSE
  2162.         IMPORT_CFM_FUNCTION    SGAddFrame
  2163.     ENDIF
  2164.  
  2165. ;
  2166. ; pascal ComponentResult SGTransferFrameForCompress(SGChannel c, short bufferNum, const MatrixRecord *mp, RgnHandle clipRgn)
  2167. ;
  2168.     IF ¬ GENERATINGCFM THEN
  2169.         Macro
  2170.         _SGTransferFrameForCompress
  2171.             dc.w     $2F3C
  2172.             dc.w     $000A
  2173.             dc.w     $0112
  2174.             moveq    #0,d0
  2175.             dc.w     $A82A
  2176.         EndM
  2177.     ELSE
  2178.         IMPORT_CFM_FUNCTION    SGTransferFrameForCompress
  2179.     ENDIF
  2180.  
  2181. ;
  2182. ; pascal ComponentResult SGSetCompressBuffer(SGChannel c, short depth, const Rect *compressSize)
  2183. ;
  2184.     IF ¬ GENERATINGCFM THEN
  2185.         Macro
  2186.         _SGSetCompressBuffer
  2187.             dc.w     $2F3C
  2188.             dc.w     $0006
  2189.             dc.w     $0113
  2190.             moveq    #0,d0
  2191.             dc.w     $A82A
  2192.         EndM
  2193.     ELSE
  2194.         IMPORT_CFM_FUNCTION    SGSetCompressBuffer
  2195.     ENDIF
  2196.  
  2197. ;
  2198. ; pascal ComponentResult SGGetCompressBuffer(SGChannel c, short *depth, Rect *compressSize)
  2199. ;
  2200.     IF ¬ GENERATINGCFM THEN
  2201.         Macro
  2202.         _SGGetCompressBuffer
  2203.             dc.w     $2F3C
  2204.             dc.w     $0008
  2205.             dc.w     $0114
  2206.             moveq    #0,d0
  2207.             dc.w     $A82A
  2208.         EndM
  2209.     ELSE
  2210.         IMPORT_CFM_FUNCTION    SGGetCompressBuffer
  2211.     ENDIF
  2212.  
  2213. ;
  2214. ; pascal ComponentResult SGGetBufferInfo(SGChannel c, short bufferNum, PixMapHandle *bufferPM, Rect *bufferRect, GWorldPtr *compressBuffer, Rect *compressBufferRect)
  2215. ;
  2216.     IF ¬ GENERATINGCFM THEN
  2217.         Macro
  2218.         _SGGetBufferInfo
  2219.             dc.w     $2F3C
  2220.             dc.w     $0012
  2221.             dc.w     $0115
  2222.             moveq    #0,d0
  2223.             dc.w     $A82A
  2224.         EndM
  2225.     ELSE
  2226.         IMPORT_CFM_FUNCTION    SGGetBufferInfo
  2227.     ENDIF
  2228.  
  2229. ;
  2230. ; pascal ComponentResult SGSetUseScreenBuffer(SGChannel c, Boolean useScreenBuffer)
  2231. ;
  2232.     IF ¬ GENERATINGCFM THEN
  2233.         Macro
  2234.         _SGSetUseScreenBuffer
  2235.             dc.w     $2F3C
  2236.             dc.w     $0002
  2237.             dc.w     $0116
  2238.             moveq    #0,d0
  2239.             dc.w     $A82A
  2240.         EndM
  2241.     ELSE
  2242.         IMPORT_CFM_FUNCTION    SGSetUseScreenBuffer
  2243.     ENDIF
  2244.  
  2245. ;
  2246. ; pascal ComponentResult SGGetUseScreenBuffer(SGChannel c, Boolean *useScreenBuffer)
  2247. ;
  2248.     IF ¬ GENERATINGCFM THEN
  2249.         Macro
  2250.         _SGGetUseScreenBuffer
  2251.             dc.w     $2F3C
  2252.             dc.w     $0004
  2253.             dc.w     $0117
  2254.             moveq    #0,d0
  2255.             dc.w     $A82A
  2256.         EndM
  2257.     ELSE
  2258.         IMPORT_CFM_FUNCTION    SGGetUseScreenBuffer
  2259.     ENDIF
  2260.  
  2261. ;
  2262. ; pascal ComponentResult SGGrabCompressComplete(SGChannel c, Boolean *done, SGCompressInfo *ci, TimeRecord *tr)
  2263. ;
  2264.     IF ¬ GENERATINGCFM THEN
  2265.         Macro
  2266.         _SGGrabCompressComplete
  2267.             dc.w     $2F3C
  2268.             dc.w     $000C
  2269.             dc.w     $0118
  2270.             moveq    #0,d0
  2271.             dc.w     $A82A
  2272.         EndM
  2273.     ELSE
  2274.         IMPORT_CFM_FUNCTION    SGGrabCompressComplete
  2275.     ENDIF
  2276.  
  2277. ;
  2278. ; pascal ComponentResult SGDisplayCompress(SGChannel c, Ptr dataPtr, ImageDescriptionHandle desc, MatrixRecord *mp, RgnHandle clipRgn)
  2279. ;
  2280.     IF ¬ GENERATINGCFM THEN
  2281.         Macro
  2282.         _SGDisplayCompress
  2283.             dc.w     $2F3C
  2284.             dc.w     $0010
  2285.             dc.w     $0119
  2286.             moveq    #0,d0
  2287.             dc.w     $A82A
  2288.         EndM
  2289.     ELSE
  2290.         IMPORT_CFM_FUNCTION    SGDisplayCompress
  2291.     ENDIF
  2292.  
  2293. ;
  2294. ; pascal ComponentResult SGSetFrameRate(SGChannel c, Fixed frameRate)
  2295. ;
  2296.     IF ¬ GENERATINGCFM THEN
  2297.         Macro
  2298.         _SGSetFrameRate
  2299.             dc.w     $2F3C
  2300.             dc.w     $0004
  2301.             dc.w     $011A
  2302.             moveq    #0,d0
  2303.             dc.w     $A82A
  2304.         EndM
  2305.     ELSE
  2306.         IMPORT_CFM_FUNCTION    SGSetFrameRate
  2307.     ENDIF
  2308.  
  2309. ;
  2310. ; pascal ComponentResult SGGetFrameRate(SGChannel c, Fixed *frameRate)
  2311. ;
  2312.     IF ¬ GENERATINGCFM THEN
  2313.         Macro
  2314.         _SGGetFrameRate
  2315.             dc.w     $2F3C
  2316.             dc.w     $0004
  2317.             dc.w     $011B
  2318.             moveq    #0,d0
  2319.             dc.w     $A82A
  2320.         EndM
  2321.     ELSE
  2322.         IMPORT_CFM_FUNCTION    SGGetFrameRate
  2323.     ENDIF
  2324.  
  2325. ;** Sequence Grab SOUND CHANNEL Component Stuff **
  2326. ;
  2327. ;    Sound stuff
  2328. ;
  2329. ;
  2330. ; pascal ComponentResult SGSetSoundInputDriver(SGChannel c, ConstStr255Param driverName)
  2331. ;
  2332.     IF ¬ GENERATINGCFM THEN
  2333.         Macro
  2334.         _SGSetSoundInputDriver
  2335.             dc.w     $2F3C
  2336.             dc.w     $0004
  2337.             dc.w     $0100
  2338.             moveq    #0,d0
  2339.             dc.w     $A82A
  2340.         EndM
  2341.     ELSE
  2342.         IMPORT_CFM_FUNCTION    SGSetSoundInputDriver
  2343.     ENDIF
  2344.  
  2345. ;
  2346. ; pascal long SGGetSoundInputDriver(SGChannel c)
  2347. ;
  2348.     IF ¬ GENERATINGCFM THEN
  2349.         Macro
  2350.         _SGGetSoundInputDriver
  2351.             dc.w     $2F3C
  2352.             dc.w     $0000
  2353.             dc.w     $0101
  2354.             moveq    #0,d0
  2355.             dc.w     $A82A
  2356.         EndM
  2357.     ELSE
  2358.         IMPORT_CFM_FUNCTION    SGGetSoundInputDriver
  2359.     ENDIF
  2360.  
  2361. ;
  2362. ; pascal ComponentResult SGSoundInputDriverChanged(SGChannel c)
  2363. ;
  2364.     IF ¬ GENERATINGCFM THEN
  2365.         Macro
  2366.         _SGSoundInputDriverChanged
  2367.             dc.w     $2F3C
  2368.             dc.w     $0000
  2369.             dc.w     $0102
  2370.             moveq    #0,d0
  2371.             dc.w     $A82A
  2372.         EndM
  2373.     ELSE
  2374.         IMPORT_CFM_FUNCTION    SGSoundInputDriverChanged
  2375.     ENDIF
  2376.  
  2377. ;
  2378. ; pascal ComponentResult SGSetSoundRecordChunkSize(SGChannel c, long seconds)
  2379. ;
  2380.     IF ¬ GENERATINGCFM THEN
  2381.         Macro
  2382.         _SGSetSoundRecordChunkSize
  2383.             dc.w     $2F3C
  2384.             dc.w     $0004
  2385.             dc.w     $0103
  2386.             moveq    #0,d0
  2387.             dc.w     $A82A
  2388.         EndM
  2389.     ELSE
  2390.         IMPORT_CFM_FUNCTION    SGSetSoundRecordChunkSize
  2391.     ENDIF
  2392.  
  2393. ;
  2394. ; pascal long SGGetSoundRecordChunkSize(SGChannel c)
  2395. ;
  2396.     IF ¬ GENERATINGCFM THEN
  2397.         Macro
  2398.         _SGGetSoundRecordChunkSize
  2399.             dc.w     $2F3C
  2400.             dc.w     $0000
  2401.             dc.w     $0104
  2402.             moveq    #0,d0
  2403.             dc.w     $A82A
  2404.         EndM
  2405.     ELSE
  2406.         IMPORT_CFM_FUNCTION    SGGetSoundRecordChunkSize
  2407.     ENDIF
  2408.  
  2409. ;
  2410. ; pascal ComponentResult SGSetSoundInputRate(SGChannel c, Fixed rate)
  2411. ;
  2412.     IF ¬ GENERATINGCFM THEN
  2413.         Macro
  2414.         _SGSetSoundInputRate
  2415.             dc.w     $2F3C
  2416.             dc.w     $0004
  2417.             dc.w     $0105
  2418.             moveq    #0,d0
  2419.             dc.w     $A82A
  2420.         EndM
  2421.     ELSE
  2422.         IMPORT_CFM_FUNCTION    SGSetSoundInputRate
  2423.     ENDIF
  2424.  
  2425. ;
  2426. ; pascal Fixed SGGetSoundInputRate(SGChannel c)
  2427. ;
  2428.     IF ¬ GENERATINGCFM THEN
  2429.         Macro
  2430.         _SGGetSoundInputRate
  2431.             dc.w     $2F3C
  2432.             dc.w     $0000
  2433.             dc.w     $0106
  2434.             moveq    #0,d0
  2435.             dc.w     $A82A
  2436.         EndM
  2437.     ELSE
  2438.         IMPORT_CFM_FUNCTION    SGGetSoundInputRate
  2439.     ENDIF
  2440.  
  2441. ;
  2442. ; pascal ComponentResult SGSetSoundInputParameters(SGChannel c, short sampleSize, short numChannels, OSType compressionType)
  2443. ;
  2444.     IF ¬ GENERATINGCFM THEN
  2445.         Macro
  2446.         _SGSetSoundInputParameters
  2447.             dc.w     $2F3C
  2448.             dc.w     $0008
  2449.             dc.w     $0107
  2450.             moveq    #0,d0
  2451.             dc.w     $A82A
  2452.         EndM
  2453.     ELSE
  2454.         IMPORT_CFM_FUNCTION    SGSetSoundInputParameters
  2455.     ENDIF
  2456.  
  2457. ;
  2458. ; pascal ComponentResult SGGetSoundInputParameters(SGChannel c, short *sampleSize, short *numChannels, OSType *compressionType)
  2459. ;
  2460.     IF ¬ GENERATINGCFM THEN
  2461.         Macro
  2462.         _SGGetSoundInputParameters
  2463.             dc.w     $2F3C
  2464.             dc.w     $000C
  2465.             dc.w     $0108
  2466.             moveq    #0,d0
  2467.             dc.w     $A82A
  2468.         EndM
  2469.     ELSE
  2470.         IMPORT_CFM_FUNCTION    SGGetSoundInputParameters
  2471.     ENDIF
  2472.  
  2473.  
  2474. sgChannelAtom                    EQU        'chan'
  2475. sgChannelSettingsAtom            EQU        'ctom'
  2476. sgChannelDescription            EQU        'cdsc'
  2477. sgChannelSettings                EQU        'cset'
  2478.  
  2479. sgDeviceNameType                EQU        'name'
  2480. sgUsageType                        EQU        'use '
  2481. sgPlayFlagsType                    EQU        'plyf'
  2482. sgClipType                        EQU        'clip'
  2483. sgMatrixType                    EQU        'mtrx'
  2484. sgVolumeType                    EQU        'volu'
  2485.  
  2486. sgPanelSettingsAtom                EQU        'ptom'
  2487. sgPanelDescription                EQU        'pdsc'
  2488. sgPanelSettings                    EQU        'pset'
  2489.  
  2490. sgcSoundCompressionType            EQU        'scmp'
  2491. sgcSoundSampleRateType            EQU        'srat'
  2492. sgcSoundChannelCountType        EQU        'schn'
  2493. sgcSoundSampleSizeType            EQU        'ssiz'
  2494. sgcSoundInputType                EQU        'sinp'
  2495. sgcSoundGainType                EQU        'gain'
  2496.  
  2497. sgcVideoHueType                    EQU        'hue '
  2498. sgcVideoSaturationType            EQU        'satr'
  2499. sgcVideoContrastType            EQU        'trst'
  2500. sgcVideoSharpnessType            EQU        'shrp'
  2501. sgcVideoBrigtnessType            EQU        'brit'
  2502. sgcVideoBlackLevelType            EQU        'blkl'
  2503. sgcVideoWhiteLevelType            EQU        'whtl'
  2504. sgcVideoInputType                EQU        'vinp'
  2505. sgcVideoFormatType                EQU        'vstd'
  2506. sgcVideoFilterType                EQU        'vflt'
  2507. sgcVideoRectType                EQU        'vrct'
  2508. sgVideoDigitizerType            EQU        'vdig'
  2509.  
  2510. kSGInitializeSelect                EQU        $1
  2511. kSGSetDataOutputSelect            EQU        $2
  2512. kSGGetDataOutputSelect            EQU        $3
  2513. kSGSetGWorldSelect                EQU        $4
  2514. kSGGetGWorldSelect                EQU        $5
  2515. kSGNewChannelSelect                EQU        $6
  2516. kSGDisposeChannelSelect            EQU        $7
  2517. kSGStartPreviewSelect            EQU        $10
  2518. kSGStartRecordSelect            EQU        $11
  2519. kSGIdleSelect                    EQU        $12
  2520. kSGStopSelect                    EQU        $13
  2521. kSGPauseSelect                    EQU        $14
  2522. kSGPrepareSelect                EQU        $15
  2523. kSGReleaseSelect                EQU        $16
  2524. kSGGetMovieSelect                EQU        $17
  2525. kSGSetMaximumRecordTimeSelect    EQU        $18
  2526. kSGGetMaximumRecordTimeSelect    EQU        $19
  2527. kSGGetStorageSpaceRemainingSelect EQU        $1A
  2528. kSGGetTimeRemainingSelect        EQU        $1B
  2529. kSGGrabPictSelect                EQU        $1C
  2530. kSGGetLastMovieResIDSelect        EQU        $1D
  2531. kSGSetFlagsSelect                EQU        $1E
  2532. kSGGetFlagsSelect                EQU        $1F
  2533. kSGSetDataProcSelect            EQU        $20
  2534. kSGNewChannelFromComponentSelect EQU        $21
  2535. kSGDisposeDeviceListSelect        EQU        $22
  2536. kSGAppendDeviceListToMenuSelect    EQU        $23
  2537. kSGSetSettingsSelect            EQU        $24
  2538. kSGGetSettingsSelect            EQU        $25
  2539. kSGGetIndChannelSelect            EQU        $26
  2540. kSGUpdateSelect                    EQU        $27
  2541. kSGGetPauseSelect                EQU        $28
  2542. kSGSettingsDialogSelect            EQU        $29
  2543. kSGGetAlignmentProcSelect        EQU        $2A
  2544. kSGSetChannelSettingsSelect        EQU        $2B
  2545. kSGGetChannelSettingsSelect        EQU        $2C
  2546. kSGGetModeSelect                EQU        $2D
  2547. kSGSetDataRefSelect                EQU        $2E
  2548. kSGGetDataRefSelect                EQU        $2F
  2549. kSGNewOutputSelect                EQU        $30
  2550. kSGDisposeOutputSelect            EQU        $31
  2551. kSGSetOutputFlagsSelect            EQU        $32
  2552. kSGSetChannelOutputSelect        EQU        $33
  2553. kSGGetDataOutputStorageSpaceRemainingSelect EQU        $34
  2554. kSGWriteMovieDataSelect            EQU        $100
  2555. kSGAddFrameReferenceSelect        EQU        $101
  2556. kSGGetNextFrameReferenceSelect    EQU        $102
  2557. kSGGetTimeBaseSelect            EQU        $103
  2558. kSGSortDeviceListSelect            EQU        $104
  2559. kSGAddMovieDataSelect            EQU        $105
  2560. kSGChangedSourceSelect            EQU        $106
  2561. kSGCSetChannelUsageSelect        EQU        $80
  2562. kSGCGetChannelUsageSelect        EQU        $81
  2563. kSGCSetChannelBoundsSelect        EQU        $82
  2564. kSGCGetChannelBoundsSelect        EQU        $83
  2565. kSGCSetChannelVolumeSelect        EQU        $84
  2566. kSGCGetChannelVolumeSelect        EQU        $85
  2567. kSGCGetChannelInfoSelect        EQU        $86
  2568. kSGCSetChannelPlayFlagsSelect    EQU        $87
  2569. kSGCGetChannelPlayFlagsSelect    EQU        $88
  2570. kSGCSetChannelMaxFramesSelect    EQU        $89
  2571. kSGCGetChannelMaxFramesSelect    EQU        $8A
  2572. kSGCSetChannelRefConSelect        EQU        $8B
  2573. kSGCSetChannelClipSelect        EQU        $8C
  2574. kSGCGetChannelClipSelect        EQU        $8D
  2575. kSGCGetChannelSampleDescriptionSelect EQU        $8E
  2576. kSGCGetChannelDeviceListSelect    EQU        $8F
  2577. kSGCSetChannelDeviceSelect        EQU        $90
  2578. kSGCSetChannelMatrixSelect        EQU        $91
  2579. kSGCGetChannelMatrixSelect        EQU        $92
  2580. kSGCGetChannelTimeScaleSelect    EQU        $93
  2581. kSGCChannelPutPictureSelect        EQU        $94
  2582. kSGCChannelSetRequestedDataRateSelect EQU        $95
  2583. kSGCChannelGetRequestedDataRateSelect EQU        $96
  2584. kSGCChannelSetDataSourceNameSelect EQU        $97
  2585. kSGCChannelGetDataSourceNameSelect EQU        $98
  2586. kSGCInitChannelSelect            EQU        $180
  2587. kSGCWriteSamplesSelect            EQU        $181
  2588. kSGCGetDataRateSelect            EQU        $182
  2589. kSGCAlignChannelRectSelect        EQU        $183
  2590. kSGCPanelGetDitlSelect            EQU        $200
  2591. kSGCPanelGetTitleSelect            EQU        $201
  2592. kSGCPanelCanRunSelect            EQU        $202
  2593. kSGCPanelInstallSelect            EQU        $203
  2594. kSGCPanelEventSelect            EQU        $204
  2595. kSGCPanelItemSelect                EQU        $205
  2596. kSGCPanelRemoveSelect            EQU        $206
  2597. kSGCPanelSetGrabberSelect        EQU        $207
  2598. kSGCPanelSetResFileSelect        EQU        $208
  2599. kSGCPanelGetSettingsSelect        EQU        $209
  2600. kSGCPanelSetSettingsSelect        EQU        $20A
  2601. kSGCPanelValidateInputSelect    EQU        $20B
  2602. kSGCPanelSetEventFilterSelect    EQU        $20C
  2603. kSGCGetSrcVideoBoundsSelect        EQU        $100
  2604. kSGCSetVideoRectSelect            EQU        $101
  2605. kSGCGetVideoRectSelect            EQU        $102
  2606. kSGCGetVideoCompressorTypeSelect EQU        $103
  2607. kSGCSetVideoCompressorTypeSelect EQU        $104
  2608. kSGCSetVideoCompressorSelect    EQU        $105
  2609. kSGCGetVideoCompressorSelect    EQU        $106
  2610. kSGCGetVideoDigitizerComponentSelect EQU        $107
  2611. kSGCSetVideoDigitizerComponentSelect EQU        $108
  2612. kSGCVideoDigitizerChangedSelect    EQU        $109
  2613. kSGCSetVideoBottlenecksSelect    EQU        $10A
  2614. kSGCGetVideoBottlenecksSelect    EQU        $10B
  2615. kSGCGrabFrameSelect                EQU        $10C
  2616. kSGCGrabFrameCompleteSelect        EQU        $10D
  2617. kSGCDisplayFrameSelect            EQU        $10E
  2618. kSGCCompressFrameSelect            EQU        $10F
  2619. kSGCCompressFrameCompleteSelect    EQU        $110
  2620. kSGCAddFrameSelect                EQU        $111
  2621. kSGCTransferFrameForCompressSelect EQU        $112
  2622. kSGCSetCompressBufferSelect        EQU        $113
  2623. kSGCGetCompressBufferSelect        EQU        $114
  2624. kSGCGetBufferInfoSelect            EQU        $115
  2625. kSGCSetUseScreenBufferSelect    EQU        $116
  2626. kSGCGetUseScreenBufferSelect    EQU        $117
  2627. kSGCGrabCompressCompleteSelect    EQU        $118
  2628. kSGCDisplayCompressSelect        EQU        $119
  2629. kSGCSetFrameRateSelect            EQU        $11A
  2630. kSGCGetFrameRateSelect            EQU        $11B
  2631. kSGCSetSoundInputDriverSelect    EQU        $100
  2632. kSGCGetSoundInputDriverSelect    EQU        $101
  2633. kSGCSoundInputDriverChangedSelect EQU        $102
  2634. kSGCSetSoundRecordChunkSizeSelect EQU        $103
  2635. kSGCGetSoundRecordChunkSizeSelect EQU        $104
  2636. kSGCSetSoundInputRateSelect        EQU        $105
  2637. kSGCGetSoundInputRateSelect        EQU        $106
  2638. kSGCSetSoundInputParametersSelect EQU        $107
  2639. kSGCGetSoundInputParametersSelect EQU        $108
  2640.  
  2641. ; Standard type for video digitizers 
  2642. videoDigitizerComponentType        EQU        'vdig'
  2643. vdigInterfaceRev                EQU        2
  2644.  
  2645. ; Input Format Standards 
  2646. ntscIn                            EQU        0                    ; current input format 
  2647. currentIn                        EQU        0                    ; ntsc input format 
  2648. palIn                            EQU        1                    ; pal input format 
  2649. secamIn                            EQU        2                    ; secam input format 
  2650. ntscReallyIn                    EQU        3                    ; ntsc input format 
  2651.  
  2652. ; Input Formats 
  2653. compositeIn                        EQU        0                    ; input is composite format 
  2654. sVideoIn                        EQU        1                    ; input is sVideo format 
  2655. rgbComponentIn                    EQU        2                    ; input is rgb component format 
  2656. rgbComponentSyncIn                EQU        3                    ; input is rgb component format (sync on green?)
  2657. yuvComponentIn                    EQU        4                    ; input is yuv component format 
  2658. yuvComponentSyncIn                EQU        5                    ; input is yuv component format (sync on green?) 
  2659.  
  2660. ; Video Digitizer PlayThru States 
  2661. vdPlayThruOff                    EQU        0
  2662. vdPlayThruOn                    EQU        1
  2663.  
  2664. ; Input Color Space Modes 
  2665. vdDigitizerBW                    EQU        0                    ; black and white 
  2666. vdDigitizerRGB                    EQU        1                    ; rgb color 
  2667.  
  2668. ; Phase Lock Loop Modes 
  2669. vdBroadcastMode                    EQU        0                    ; Broadcast / Laser Disk video mode 
  2670. vdVTRMode                        EQU        1                    ; VCR / Magnetic media mode 
  2671.  
  2672. ; Field Select Options 
  2673. vdUseAnyField                    EQU        0                    ; Digitizers choice on field use 
  2674. vdUseOddField                    EQU        1                    ; Use odd field for half size vert and smaller 
  2675. vdUseEvenField                    EQU        2                    ; Use even field for half size vert and smaller 
  2676.  
  2677. ; vdig types 
  2678. vdTypeBasic                        EQU        0                    ; basic, no clipping 
  2679. vdTypeAlpha                        EQU        1                    ; supports clipping with alpha channel 
  2680. vdTypeMask                        EQU        2                    ; supports clipping with mask plane 
  2681. vdTypeKey                        EQU        3                    ; supports clipping with key color(s) 
  2682.  
  2683. ; Digitizer Input Capability/Current Flags    
  2684. digiInDoesNTSC                    EQU        1 << 0                ; digitizer supports NTSC input format 
  2685. digiInDoesPAL                    EQU        1 << 1                ; digitizer supports PAL input format 
  2686. digiInDoesSECAM                    EQU        1 << 2                ; digitizer supports SECAM input format 
  2687. digiInDoesGenLock                EQU        1 << 7                ; digitizer does genlock 
  2688. digiInDoesComposite                EQU        1 << 8                ; digitizer supports composite input type 
  2689. digiInDoesSVideo                EQU        1 << 9                ; digitizer supports S-Video input type 
  2690. digiInDoesComponent                EQU        1 << 10                ; digitizer supports component = rgb, input type 
  2691. digiInVTR_Broadcast                EQU        1 << 11                ; digitizer can differentiate between the two 
  2692. digiInDoesColor                    EQU        1 << 12                ; digitizer supports color 
  2693. digiInDoesBW                    EQU        1 << 13                ; digitizer supports black & white 
  2694. ; Digitizer Input Current Flags = these are valid only during active operating conditions,    
  2695. digiInSignalLock                EQU        1 << 31                ; digitizer detects input signal is locked, this bit = horiz lock || vertical lock 
  2696.  
  2697. ; Digitizer Output Capability/Current Flags 
  2698. digiOutDoes1                    EQU        1 << 0                ; digitizer supports 1 bit pixels 
  2699. digiOutDoes2                    EQU        1 << 1                ; digitizer supports 2 bit pixels 
  2700. digiOutDoes4                    EQU        1 << 2                ; digitizer supports 4 bit pixels 
  2701. digiOutDoes8                    EQU        1 << 3                ; digitizer supports 8 bit pixels 
  2702. digiOutDoes16                    EQU        1 << 4                ; digitizer supports 16 bit pixels 
  2703. digiOutDoes32                    EQU        1 << 5                ; digitizer supports 32 bit pixels 
  2704. digiOutDoesDither                EQU        1 << 6                ; digitizer dithers in indexed modes 
  2705. digiOutDoesStretch                EQU        1 << 7                ; digitizer can arbitrarily stretch 
  2706. digiOutDoesShrink                EQU        1 << 8                ; digitizer can arbitrarily shrink 
  2707. digiOutDoesMask                    EQU        1 << 9                ; digitizer can mask to clipping regions 
  2708. digiOutDoesDouble                EQU        1 << 11                ; digitizer can stretch to exactly double size 
  2709. digiOutDoesQuad                    EQU        1 << 12                ; digitizer can stretch exactly quadruple size 
  2710. digiOutDoesQuarter                EQU        1 << 13                ; digitizer can shrink to exactly quarter size 
  2711. digiOutDoesSixteenth            EQU        1 << 14                ; digitizer can shrink to exactly sixteenth size 
  2712. digiOutDoesRotate                EQU        1 << 15                ; digitizer supports rotate transformations 
  2713. digiOutDoesHorizFlip            EQU        1 << 16                ; digitizer supports horizontal flips Sx < 0 
  2714. digiOutDoesVertFlip                EQU        1 << 17                ; digitizer supports vertical flips Sy < 0 
  2715. digiOutDoesSkew                    EQU        1 << 18                ; digitizer supports skew = shear,twist, 
  2716. digiOutDoesBlend                EQU        1 << 19
  2717. digiOutDoesWarp                    EQU        1 << 20
  2718. digiOutDoesHW_DMA                EQU        1 << 21                ; digitizer not constrained to local device 
  2719. digiOutDoesHWPlayThru            EQU        1 << 22                ; digitizer doesn't need time to play thru 
  2720. digiOutDoesILUT                    EQU        1 << 23                ; digitizer does inverse LUT for index modes 
  2721. digiOutDoesKeyColor                EQU        1 << 24                ; digitizer does key color functions too 
  2722. digiOutDoesAsyncGrabs            EQU        1 << 25                ; digitizer supports async grabs 
  2723. digiOutDoesUnreadableScreenBits    EQU        1 << 26                ; playthru doesn't generate readable bits on screen
  2724. digiOutDoesCompress                EQU        1 << 27                ; supports alternate output data types 
  2725. digiOutDoesCompressOnly            EQU        1 << 28                ; can't provide raw frames anywhere 
  2726. digiOutDoesPlayThruDuringCompress EQU        1 << 29            ; digi can do playthru while providing compressed data 
  2727.  
  2728. ; Types 
  2729. ; typedef ComponentInstance  VideoDigitizerComponent
  2730. ; typedef ComponentResult     VideoDigitizerError
  2731. DigitizerInfo             RECORD    0
  2732. vdigType                 ds.w   1        ; offset: $0 (0)
  2733. inputCapabilityFlags     ds.l   1        ; offset: $2 (2)
  2734. outputCapabilityFlags     ds.l   1        ; offset: $6 (6)
  2735. inputCurrentFlags         ds.l   1        ; offset: $A (10)
  2736. outputCurrentFlags         ds.l   1        ; offset: $E (14)
  2737. slot                     ds.w   1        ; offset: $12 (18)        ; temporary for connection purposes 
  2738. gdh                         ds.l   1        ; offset: $14 (20)        ; temporary for digitizers that have preferred screen 
  2739. maskgdh                     ds.l   1        ; offset: $18 (24)        ; temporary for digitizers that have mask planes 
  2740. minDestHeight             ds.w   1        ; offset: $1C (28)        ; Smallest resizable height 
  2741. minDestWidth             ds.w   1        ; offset: $1E (30)        ; Smallest resizable width 
  2742. maxDestHeight             ds.w   1        ; offset: $20 (32)        ; Largest resizable height 
  2743. maxDestWidth             ds.w   1        ; offset: $22 (34)        ; Largest resizable height 
  2744. blendLevels                 ds.w   1        ; offset: $24 (36)        ; Number of blend levels supported (2 if 1 bit mask) 
  2745. reserved                 ds.l   1        ; offset: $26 (38)        ; reserved 
  2746. sizeof                     EQU *            ; size:   $2A (42)
  2747.                         ENDR
  2748.  
  2749. ; typedef struct DigitizerInfo  DigitizerInfo
  2750. VdigType                 RECORD    0
  2751. digType                     ds.l   1        ; offset: $0 (0)
  2752. reserved                 ds.l   1        ; offset: $4 (4)
  2753. sizeof                     EQU *            ; size:   $8 (8)
  2754.                         ENDR
  2755.  
  2756. ; typedef struct VdigType     VdigType
  2757. VdigTypeList             RECORD    0
  2758. count                     ds.w   1        ; offset: $0 (0)
  2759. list                     ds     VdigType ; offset: $2 (2)
  2760. sizeof                     EQU *            ; size:   $A (10)
  2761.                         ENDR
  2762.  
  2763. ; typedef struct VdigTypeList  VdigTypeList
  2764. VdigBufferRec             RECORD    0
  2765. dest                     ds.l   1        ; offset: $0 (0)
  2766. location                 ds     Point    ; offset: $4 (4)
  2767. reserved                 ds.l   1        ; offset: $8 (8)
  2768. sizeof                     EQU *            ; size:   $C (12)
  2769.                         ENDR
  2770.  
  2771. ; typedef struct VdigBufferRec  VdigBufferRec
  2772. VdigBufferRecList         RECORD    0
  2773. count                     ds.w   1        ; offset: $0 (0)
  2774. matrix                     ds.l   1        ; offset: $2 (2)
  2775. mask                     ds.l   1        ; offset: $6 (6)
  2776. list                     ds     VdigBufferRec ; offset: $A (10)
  2777. sizeof                     EQU *            ; size:   $16 (22)
  2778.                         ENDR
  2779.  
  2780. ; typedef struct VdigBufferRecList  VdigBufferRecList, *VdigBufferRecListPtr, **VdigBufferRecListHandle
  2781. VDCompressionList         RECORD    0
  2782. codec                     ds.l   1        ; offset: $0 (0)
  2783. cType                     ds.l   1        ; offset: $4 (4)
  2784. typeName                 ds.l   16        ; offset: $8 (8)
  2785. name                     ds.l   16        ; offset: $48 (72)
  2786. formatFlags                 ds.l   1        ; offset: $88 (136)
  2787. compressFlags             ds.l   1        ; offset: $8C (140)
  2788. reserved                 ds.l   1        ; offset: $90 (144)
  2789. sizeof                     EQU *            ; size:   $94 (148)
  2790.                         ENDR
  2791.  
  2792. ; typedef struct VDCompressionList  VDCompressionList, *VDCompressionListPtr, **VDCompressionListHandle
  2793.  
  2794. dmaDepth1                        EQU        1
  2795. dmaDepth2                        EQU        2
  2796. dmaDepth4                        EQU        4
  2797. dmaDepth8                        EQU        8
  2798. dmaDepth16                        EQU        16
  2799. dmaDepth32                        EQU        32
  2800. dmaDepth2Gray                    EQU        64
  2801. dmaDepth4Gray                    EQU        128
  2802. dmaDepth8Gray                    EQU        256
  2803.  
  2804. kVDIGControlledFrameRate        EQU        -1
  2805.  
  2806. ; number of vdig calls
  2807. kvdigSelectors                    EQU        86
  2808.  
  2809. ;
  2810. ; pascal VideoDigitizerError VDGetMaxSrcRect(VideoDigitizerComponent ci, short inputStd, Rect *maxSrcRect)
  2811. ;
  2812.     IF ¬ GENERATINGCFM THEN
  2813.         Macro
  2814.         _VDGetMaxSrcRect
  2815.             dc.w     $2F3C
  2816.             dc.w     $0006
  2817.             dc.w     $0001
  2818.             moveq    #0,d0
  2819.             dc.w     $A82A
  2820.         EndM
  2821.     ELSE
  2822.         IMPORT_CFM_FUNCTION    VDGetMaxSrcRect
  2823.     ENDIF
  2824.  
  2825. ;
  2826. ; pascal VideoDigitizerError VDGetActiveSrcRect(VideoDigitizerComponent ci, short inputStd, Rect *activeSrcRect)
  2827. ;
  2828.     IF ¬ GENERATINGCFM THEN
  2829.         Macro
  2830.         _VDGetActiveSrcRect
  2831.             dc.w     $2F3C
  2832.             dc.w     $0006
  2833.             dc.w     $0002
  2834.             moveq    #0,d0
  2835.             dc.w     $A82A
  2836.         EndM
  2837.     ELSE
  2838.         IMPORT_CFM_FUNCTION    VDGetActiveSrcRect
  2839.     ENDIF
  2840.  
  2841. ;
  2842. ; pascal VideoDigitizerError VDSetDigitizerRect(VideoDigitizerComponent ci, Rect *digitizerRect)
  2843. ;
  2844.     IF ¬ GENERATINGCFM THEN
  2845.         Macro
  2846.         _VDSetDigitizerRect
  2847.             dc.w     $2F3C
  2848.             dc.w     $0004
  2849.             dc.w     $0003
  2850.             moveq    #0,d0
  2851.             dc.w     $A82A
  2852.         EndM
  2853.     ELSE
  2854.         IMPORT_CFM_FUNCTION    VDSetDigitizerRect
  2855.     ENDIF
  2856.  
  2857. ;
  2858. ; pascal VideoDigitizerError VDGetDigitizerRect(VideoDigitizerComponent ci, Rect *digitizerRect)
  2859. ;
  2860.     IF ¬ GENERATINGCFM THEN
  2861.         Macro
  2862.         _VDGetDigitizerRect
  2863.             dc.w     $2F3C
  2864.             dc.w     $0004
  2865.             dc.w     $0004
  2866.             moveq    #0,d0
  2867.             dc.w     $A82A
  2868.         EndM
  2869.     ELSE
  2870.         IMPORT_CFM_FUNCTION    VDGetDigitizerRect
  2871.     ENDIF
  2872.  
  2873. ;
  2874. ; pascal VideoDigitizerError VDGetVBlankRect(VideoDigitizerComponent ci, short inputStd, Rect *vBlankRect)
  2875. ;
  2876.     IF ¬ GENERATINGCFM THEN
  2877.         Macro
  2878.         _VDGetVBlankRect
  2879.             dc.w     $2F3C
  2880.             dc.w     $0006
  2881.             dc.w     $0005
  2882.             moveq    #0,d0
  2883.             dc.w     $A82A
  2884.         EndM
  2885.     ELSE
  2886.         IMPORT_CFM_FUNCTION    VDGetVBlankRect
  2887.     ENDIF
  2888.  
  2889. ;
  2890. ; pascal VideoDigitizerError VDGetMaskPixMap(VideoDigitizerComponent ci, PixMapHandle maskPixMap)
  2891. ;
  2892.     IF ¬ GENERATINGCFM THEN
  2893.         Macro
  2894.         _VDGetMaskPixMap
  2895.             dc.w     $2F3C
  2896.             dc.w     $0004
  2897.             dc.w     $0006
  2898.             moveq    #0,d0
  2899.             dc.w     $A82A
  2900.         EndM
  2901.     ELSE
  2902.         IMPORT_CFM_FUNCTION    VDGetMaskPixMap
  2903.     ENDIF
  2904.  
  2905. ;
  2906. ; pascal VideoDigitizerError VDGetPlayThruDestination(VideoDigitizerComponent ci, PixMapHandle *dest, Rect *destRect, MatrixRecord *m, RgnHandle *mask)
  2907. ;
  2908.     IF ¬ GENERATINGCFM THEN
  2909.         Macro
  2910.         _VDGetPlayThruDestination
  2911.             dc.w     $2F3C
  2912.             dc.w     $0010
  2913.             dc.w     $0008
  2914.             moveq    #0,d0
  2915.             dc.w     $A82A
  2916.         EndM
  2917.     ELSE
  2918.         IMPORT_CFM_FUNCTION    VDGetPlayThruDestination
  2919.     ENDIF
  2920.  
  2921. ;
  2922. ; pascal VideoDigitizerError VDUseThisCLUT(VideoDigitizerComponent ci, CTabHandle colorTableHandle)
  2923. ;
  2924.     IF ¬ GENERATINGCFM THEN
  2925.         Macro
  2926.         _VDUseThisCLUT
  2927.             dc.w     $2F3C
  2928.             dc.w     $0004
  2929.             dc.w     $0009
  2930.             moveq    #0,d0
  2931.             dc.w     $A82A
  2932.         EndM
  2933.     ELSE
  2934.         IMPORT_CFM_FUNCTION    VDUseThisCLUT
  2935.     ENDIF
  2936.  
  2937. ;
  2938. ; pascal VideoDigitizerError VDSetInputGammaValue(VideoDigitizerComponent ci, Fixed channel1, Fixed channel2, Fixed channel3)
  2939. ;
  2940.     IF ¬ GENERATINGCFM THEN
  2941.         Macro
  2942.         _VDSetInputGammaValue
  2943.             dc.w     $2F3C
  2944.             dc.w     $000C
  2945.             dc.w     $000A
  2946.             moveq    #0,d0
  2947.             dc.w     $A82A
  2948.         EndM
  2949.     ELSE
  2950.         IMPORT_CFM_FUNCTION    VDSetInputGammaValue
  2951.     ENDIF
  2952.  
  2953. ;
  2954. ; pascal VideoDigitizerError VDGetInputGammaValue(VideoDigitizerComponent ci, Fixed *channel1, Fixed *channel2, Fixed *channel3)
  2955. ;
  2956.     IF ¬ GENERATINGCFM THEN
  2957.         Macro
  2958.         _VDGetInputGammaValue
  2959.             dc.w     $2F3C
  2960.             dc.w     $000C
  2961.             dc.w     $000B
  2962.             moveq    #0,d0
  2963.             dc.w     $A82A
  2964.         EndM
  2965.     ELSE
  2966.         IMPORT_CFM_FUNCTION    VDGetInputGammaValue
  2967.     ENDIF
  2968.  
  2969. ;
  2970. ; pascal VideoDigitizerError VDSetBrightness(VideoDigitizerComponent ci, unsigned short *brightness)
  2971. ;
  2972.     IF ¬ GENERATINGCFM THEN
  2973.         Macro
  2974.         _VDSetBrightness
  2975.             dc.w     $2F3C
  2976.             dc.w     $0004
  2977.             dc.w     $000C
  2978.             moveq    #0,d0
  2979.             dc.w     $A82A
  2980.         EndM
  2981.     ELSE
  2982.         IMPORT_CFM_FUNCTION    VDSetBrightness
  2983.     ENDIF
  2984.  
  2985. ;
  2986. ; pascal VideoDigitizerError VDGetBrightness(VideoDigitizerComponent ci, unsigned short *brightness)
  2987. ;
  2988.     IF ¬ GENERATINGCFM THEN
  2989.         Macro
  2990.         _VDGetBrightness
  2991.             dc.w     $2F3C
  2992.             dc.w     $0004
  2993.             dc.w     $000D
  2994.             moveq    #0,d0
  2995.             dc.w     $A82A
  2996.         EndM
  2997.     ELSE
  2998.         IMPORT_CFM_FUNCTION    VDGetBrightness
  2999.     ENDIF
  3000.  
  3001. ;
  3002. ; pascal VideoDigitizerError VDSetContrast(VideoDigitizerComponent ci, unsigned short *contrast)
  3003. ;
  3004.     IF ¬ GENERATINGCFM THEN
  3005.         Macro
  3006.         _VDSetContrast
  3007.             dc.w     $2F3C
  3008.             dc.w     $0004
  3009.             dc.w     $000E
  3010.             moveq    #0,d0
  3011.             dc.w     $A82A
  3012.         EndM
  3013.     ELSE
  3014.         IMPORT_CFM_FUNCTION    VDSetContrast
  3015.     ENDIF
  3016.  
  3017. ;
  3018. ; pascal VideoDigitizerError VDSetHue(VideoDigitizerComponent ci, unsigned short *hue)
  3019. ;
  3020.     IF ¬ GENERATINGCFM THEN
  3021.         Macro
  3022.         _VDSetHue
  3023.             dc.w     $2F3C
  3024.             dc.w     $0004
  3025.             dc.w     $000F
  3026.             moveq    #0,d0
  3027.             dc.w     $A82A
  3028.         EndM
  3029.     ELSE
  3030.         IMPORT_CFM_FUNCTION    VDSetHue
  3031.     ENDIF
  3032.  
  3033. ;
  3034. ; pascal VideoDigitizerError VDSetSharpness(VideoDigitizerComponent ci, unsigned short *sharpness)
  3035. ;
  3036.     IF ¬ GENERATINGCFM THEN
  3037.         Macro
  3038.         _VDSetSharpness
  3039.             dc.w     $2F3C
  3040.             dc.w     $0004
  3041.             dc.w     $0010
  3042.             moveq    #0,d0
  3043.             dc.w     $A82A
  3044.         EndM
  3045.     ELSE
  3046.         IMPORT_CFM_FUNCTION    VDSetSharpness
  3047.     ENDIF
  3048.  
  3049. ;
  3050. ; pascal VideoDigitizerError VDSetSaturation(VideoDigitizerComponent ci, unsigned short *saturation)
  3051. ;
  3052.     IF ¬ GENERATINGCFM THEN
  3053.         Macro
  3054.         _VDSetSaturation
  3055.             dc.w     $2F3C
  3056.             dc.w     $0004
  3057.             dc.w     $0011
  3058.             moveq    #0,d0
  3059.             dc.w     $A82A
  3060.         EndM
  3061.     ELSE
  3062.         IMPORT_CFM_FUNCTION    VDSetSaturation
  3063.     ENDIF
  3064.  
  3065. ;
  3066. ; pascal VideoDigitizerError VDGetContrast(VideoDigitizerComponent ci, unsigned short *contrast)
  3067. ;
  3068.     IF ¬ GENERATINGCFM THEN
  3069.         Macro
  3070.         _VDGetContrast
  3071.             dc.w     $2F3C
  3072.             dc.w     $0004
  3073.             dc.w     $0012
  3074.             moveq    #0,d0
  3075.             dc.w     $A82A
  3076.         EndM
  3077.     ELSE
  3078.         IMPORT_CFM_FUNCTION    VDGetContrast
  3079.     ENDIF
  3080.  
  3081. ;
  3082. ; pascal VideoDigitizerError VDGetHue(VideoDigitizerComponent ci, unsigned short *hue)
  3083. ;
  3084.     IF ¬ GENERATINGCFM THEN
  3085.         Macro
  3086.         _VDGetHue
  3087.             dc.w     $2F3C
  3088.             dc.w     $0004
  3089.             dc.w     $0013
  3090.             moveq    #0,d0
  3091.             dc.w     $A82A
  3092.         EndM
  3093.     ELSE
  3094.         IMPORT_CFM_FUNCTION    VDGetHue
  3095.     ENDIF
  3096.  
  3097. ;
  3098. ; pascal VideoDigitizerError VDGetSharpness(VideoDigitizerComponent ci, unsigned short *sharpness)
  3099. ;
  3100.     IF ¬ GENERATINGCFM THEN
  3101.         Macro
  3102.         _VDGetSharpness
  3103.             dc.w     $2F3C
  3104.             dc.w     $0004
  3105.             dc.w     $0014
  3106.             moveq    #0,d0
  3107.             dc.w     $A82A
  3108.         EndM
  3109.     ELSE
  3110.         IMPORT_CFM_FUNCTION    VDGetSharpness
  3111.     ENDIF
  3112.  
  3113. ;
  3114. ; pascal VideoDigitizerError VDGetSaturation(VideoDigitizerComponent ci, unsigned short *saturation)
  3115. ;
  3116.     IF ¬ GENERATINGCFM THEN
  3117.         Macro
  3118.         _VDGetSaturation
  3119.             dc.w     $2F3C
  3120.             dc.w     $0004
  3121.             dc.w     $0015
  3122.             moveq    #0,d0
  3123.             dc.w     $A82A
  3124.         EndM
  3125.     ELSE
  3126.         IMPORT_CFM_FUNCTION    VDGetSaturation
  3127.     ENDIF
  3128.  
  3129. ;
  3130. ; pascal VideoDigitizerError VDGrabOneFrame(VideoDigitizerComponent ci)
  3131. ;
  3132.     IF ¬ GENERATINGCFM THEN
  3133.         Macro
  3134.         _VDGrabOneFrame
  3135.             dc.w     $2F3C
  3136.             dc.w     $0000
  3137.             dc.w     $0016
  3138.             moveq    #0,d0
  3139.             dc.w     $A82A
  3140.         EndM
  3141.     ELSE
  3142.         IMPORT_CFM_FUNCTION    VDGrabOneFrame
  3143.     ENDIF
  3144.  
  3145. ;
  3146. ; pascal VideoDigitizerError VDGetMaxAuxBuffer(VideoDigitizerComponent ci, PixMapHandle *pm, Rect *r)
  3147. ;
  3148.     IF ¬ GENERATINGCFM THEN
  3149.         Macro
  3150.         _VDGetMaxAuxBuffer
  3151.             dc.w     $2F3C
  3152.             dc.w     $0008
  3153.             dc.w     $0017
  3154.             moveq    #0,d0
  3155.             dc.w     $A82A
  3156.         EndM
  3157.     ELSE
  3158.         IMPORT_CFM_FUNCTION    VDGetMaxAuxBuffer
  3159.     ENDIF
  3160.  
  3161. ;
  3162. ; pascal VideoDigitizerError VDGetDigitizerInfo(VideoDigitizerComponent ci, DigitizerInfo *info)
  3163. ;
  3164.     IF ¬ GENERATINGCFM THEN
  3165.         Macro
  3166.         _VDGetDigitizerInfo
  3167.             dc.w     $2F3C
  3168.             dc.w     $0004
  3169.             dc.w     $0019
  3170.             moveq    #0,d0
  3171.             dc.w     $A82A
  3172.         EndM
  3173.     ELSE
  3174.         IMPORT_CFM_FUNCTION    VDGetDigitizerInfo
  3175.     ENDIF
  3176.  
  3177. ;
  3178. ; pascal VideoDigitizerError VDGetCurrentFlags(VideoDigitizerComponent ci, long *inputCurrentFlag, long *outputCurrentFlag)
  3179. ;
  3180.     IF ¬ GENERATINGCFM THEN
  3181.         Macro
  3182.         _VDGetCurrentFlags
  3183.             dc.w     $2F3C
  3184.             dc.w     $0008
  3185.             dc.w     $001A
  3186.             moveq    #0,d0
  3187.             dc.w     $A82A
  3188.         EndM
  3189.     ELSE
  3190.         IMPORT_CFM_FUNCTION    VDGetCurrentFlags
  3191.     ENDIF
  3192.  
  3193. ;
  3194. ; pascal VideoDigitizerError VDSetKeyColor(VideoDigitizerComponent ci, long index)
  3195. ;
  3196.     IF ¬ GENERATINGCFM THEN
  3197.         Macro
  3198.         _VDSetKeyColor
  3199.             dc.w     $2F3C
  3200.             dc.w     $0004
  3201.             dc.w     $001B
  3202.             moveq    #0,d0
  3203.             dc.w     $A82A
  3204.         EndM
  3205.     ELSE
  3206.         IMPORT_CFM_FUNCTION    VDSetKeyColor
  3207.     ENDIF
  3208.  
  3209. ;
  3210. ; pascal VideoDigitizerError VDGetKeyColor(VideoDigitizerComponent ci, long *index)
  3211. ;
  3212.     IF ¬ GENERATINGCFM THEN
  3213.         Macro
  3214.         _VDGetKeyColor
  3215.             dc.w     $2F3C
  3216.             dc.w     $0004
  3217.             dc.w     $001C
  3218.             moveq    #0,d0
  3219.             dc.w     $A82A
  3220.         EndM
  3221.     ELSE
  3222.         IMPORT_CFM_FUNCTION    VDGetKeyColor
  3223.     ENDIF
  3224.  
  3225. ;
  3226. ; pascal VideoDigitizerError VDAddKeyColor(VideoDigitizerComponent ci, long *index)
  3227. ;
  3228.     IF ¬ GENERATINGCFM THEN
  3229.         Macro
  3230.         _VDAddKeyColor
  3231.             dc.w     $2F3C
  3232.             dc.w     $0004
  3233.             dc.w     $001D
  3234.             moveq    #0,d0
  3235.             dc.w     $A82A
  3236.         EndM
  3237.     ELSE
  3238.         IMPORT_CFM_FUNCTION    VDAddKeyColor
  3239.     ENDIF
  3240.  
  3241. ;
  3242. ; pascal VideoDigitizerError VDGetNextKeyColor(VideoDigitizerComponent ci, long index)
  3243. ;
  3244.     IF ¬ GENERATINGCFM THEN
  3245.         Macro
  3246.         _VDGetNextKeyColor
  3247.             dc.w     $2F3C
  3248.             dc.w     $0004
  3249.             dc.w     $001E
  3250.             moveq    #0,d0
  3251.             dc.w     $A82A
  3252.         EndM
  3253.     ELSE
  3254.         IMPORT_CFM_FUNCTION    VDGetNextKeyColor
  3255.     ENDIF
  3256.  
  3257. ;
  3258. ; pascal VideoDigitizerError VDSetKeyColorRange(VideoDigitizerComponent ci, RGBColor *minRGB, RGBColor *maxRGB)
  3259. ;
  3260.     IF ¬ GENERATINGCFM THEN
  3261.         Macro
  3262.         _VDSetKeyColorRange
  3263.             dc.w     $2F3C
  3264.             dc.w     $0008
  3265.             dc.w     $001F
  3266.             moveq    #0,d0
  3267.             dc.w     $A82A
  3268.         EndM
  3269.     ELSE
  3270.         IMPORT_CFM_FUNCTION    VDSetKeyColorRange
  3271.     ENDIF
  3272.  
  3273. ;
  3274. ; pascal VideoDigitizerError VDGetKeyColorRange(VideoDigitizerComponent ci, RGBColor *minRGB, RGBColor *maxRGB)
  3275. ;
  3276.     IF ¬ GENERATINGCFM THEN
  3277.         Macro
  3278.         _VDGetKeyColorRange
  3279.             dc.w     $2F3C
  3280.             dc.w     $0008
  3281.             dc.w     $0020
  3282.             moveq    #0,d0
  3283.             dc.w     $A82A
  3284.         EndM
  3285.     ELSE
  3286.         IMPORT_CFM_FUNCTION    VDGetKeyColorRange
  3287.     ENDIF
  3288.  
  3289. ;
  3290. ; pascal VideoDigitizerError VDSetDigitizerUserInterrupt(VideoDigitizerComponent ci, long flags, VdigIntUPP userInterruptProc, long refcon)
  3291. ;
  3292.     IF ¬ GENERATINGCFM THEN
  3293.         Macro
  3294.         _VDSetDigitizerUserInterrupt
  3295.             dc.w     $2F3C
  3296.             dc.w     $000C
  3297.             dc.w     $0021
  3298.             moveq    #0,d0
  3299.             dc.w     $A82A
  3300.         EndM
  3301.     ELSE
  3302.         IMPORT_CFM_FUNCTION    VDSetDigitizerUserInterrupt
  3303.     ENDIF
  3304.  
  3305. ;
  3306. ; pascal VideoDigitizerError VDSetInputColorSpaceMode(VideoDigitizerComponent ci, short colorSpaceMode)
  3307. ;
  3308.     IF ¬ GENERATINGCFM THEN
  3309.         Macro
  3310.         _VDSetInputColorSpaceMode
  3311.             dc.w     $2F3C
  3312.             dc.w     $0002
  3313.             dc.w     $0022
  3314.             moveq    #0,d0
  3315.             dc.w     $A82A
  3316.         EndM
  3317.     ELSE
  3318.         IMPORT_CFM_FUNCTION    VDSetInputColorSpaceMode
  3319.     ENDIF
  3320.  
  3321. ;
  3322. ; pascal VideoDigitizerError VDGetInputColorSpaceMode(VideoDigitizerComponent ci, short *colorSpaceMode)
  3323. ;
  3324.     IF ¬ GENERATINGCFM THEN
  3325.         Macro
  3326.         _VDGetInputColorSpaceMode
  3327.             dc.w     $2F3C
  3328.             dc.w     $0004
  3329.             dc.w     $0023
  3330.             moveq    #0,d0
  3331.             dc.w     $A82A
  3332.         EndM
  3333.     ELSE
  3334.         IMPORT_CFM_FUNCTION    VDGetInputColorSpaceMode
  3335.     ENDIF
  3336.  
  3337. ;
  3338. ; pascal VideoDigitizerError VDSetClipState(VideoDigitizerComponent ci, short clipEnable)
  3339. ;
  3340.     IF ¬ GENERATINGCFM THEN
  3341.         Macro
  3342.         _VDSetClipState
  3343.             dc.w     $2F3C
  3344.             dc.w     $0002
  3345.             dc.w     $0024
  3346.             moveq    #0,d0
  3347.             dc.w     $A82A
  3348.         EndM
  3349.     ELSE
  3350.         IMPORT_CFM_FUNCTION    VDSetClipState
  3351.     ENDIF
  3352.  
  3353. ;
  3354. ; pascal VideoDigitizerError VDGetClipState(VideoDigitizerComponent ci, short *clipEnable)
  3355. ;
  3356.     IF ¬ GENERATINGCFM THEN
  3357.         Macro
  3358.         _VDGetClipState
  3359.             dc.w     $2F3C
  3360.             dc.w     $0004
  3361.             dc.w     $0025
  3362.             moveq    #0,d0
  3363.             dc.w     $A82A
  3364.         EndM
  3365.     ELSE
  3366.         IMPORT_CFM_FUNCTION    VDGetClipState
  3367.     ENDIF
  3368.  
  3369. ;
  3370. ; pascal VideoDigitizerError VDSetClipRgn(VideoDigitizerComponent ci, RgnHandle clipRegion)
  3371. ;
  3372.     IF ¬ GENERATINGCFM THEN
  3373.         Macro
  3374.         _VDSetClipRgn
  3375.             dc.w     $2F3C
  3376.             dc.w     $0004
  3377.             dc.w     $0026
  3378.             moveq    #0,d0
  3379.             dc.w     $A82A
  3380.         EndM
  3381.     ELSE
  3382.         IMPORT_CFM_FUNCTION    VDSetClipRgn
  3383.     ENDIF
  3384.  
  3385. ;
  3386. ; pascal VideoDigitizerError VDClearClipRgn(VideoDigitizerComponent ci, RgnHandle clipRegion)
  3387. ;
  3388.     IF ¬ GENERATINGCFM THEN
  3389.         Macro
  3390.         _VDClearClipRgn
  3391.             dc.w     $2F3C
  3392.             dc.w     $0004
  3393.             dc.w     $0027
  3394.             moveq    #0,d0
  3395.             dc.w     $A82A
  3396.         EndM
  3397.     ELSE
  3398.         IMPORT_CFM_FUNCTION    VDClearClipRgn
  3399.     ENDIF
  3400.  
  3401. ;
  3402. ; pascal VideoDigitizerError VDGetCLUTInUse(VideoDigitizerComponent ci, CTabHandle *colorTableHandle)
  3403. ;
  3404.     IF ¬ GENERATINGCFM THEN
  3405.         Macro
  3406.         _VDGetCLUTInUse
  3407.             dc.w     $2F3C
  3408.             dc.w     $0004
  3409.             dc.w     $0028
  3410.             moveq    #0,d0
  3411.             dc.w     $A82A
  3412.         EndM
  3413.     ELSE
  3414.         IMPORT_CFM_FUNCTION    VDGetCLUTInUse
  3415.     ENDIF
  3416.  
  3417. ;
  3418. ; pascal VideoDigitizerError VDSetPLLFilterType(VideoDigitizerComponent ci, short pllType)
  3419. ;
  3420.     IF ¬ GENERATINGCFM THEN
  3421.         Macro
  3422.         _VDSetPLLFilterType
  3423.             dc.w     $2F3C
  3424.             dc.w     $0002
  3425.             dc.w     $0029
  3426.             moveq    #0,d0
  3427.             dc.w     $A82A
  3428.         EndM
  3429.     ELSE
  3430.         IMPORT_CFM_FUNCTION    VDSetPLLFilterType
  3431.     ENDIF
  3432.  
  3433. ;
  3434. ; pascal VideoDigitizerError VDGetPLLFilterType(VideoDigitizerComponent ci, short *pllType)
  3435. ;
  3436.     IF ¬ GENERATINGCFM THEN
  3437.         Macro
  3438.         _VDGetPLLFilterType
  3439.             dc.w     $2F3C
  3440.             dc.w     $0004
  3441.             dc.w     $002A
  3442.             moveq    #0,d0
  3443.             dc.w     $A82A
  3444.         EndM
  3445.     ELSE
  3446.         IMPORT_CFM_FUNCTION    VDGetPLLFilterType
  3447.     ENDIF
  3448.  
  3449. ;
  3450. ; pascal VideoDigitizerError VDGetMaskandValue(VideoDigitizerComponent ci, unsigned short blendLevel, long *mask, long *value)
  3451. ;
  3452.     IF ¬ GENERATINGCFM THEN
  3453.         Macro
  3454.         _VDGetMaskandValue
  3455.             dc.w     $2F3C
  3456.             dc.w     $000A
  3457.             dc.w     $002B
  3458.             moveq    #0,d0
  3459.             dc.w     $A82A
  3460.         EndM
  3461.     ELSE
  3462.         IMPORT_CFM_FUNCTION    VDGetMaskandValue
  3463.     ENDIF
  3464.  
  3465. ;
  3466. ; pascal VideoDigitizerError VDSetMasterBlendLevel(VideoDigitizerComponent ci, unsigned short *blendLevel)
  3467. ;
  3468.     IF ¬ GENERATINGCFM THEN
  3469.         Macro
  3470.         _VDSetMasterBlendLevel
  3471.             dc.w     $2F3C
  3472.             dc.w     $0004
  3473.             dc.w     $002C
  3474.             moveq    #0,d0
  3475.             dc.w     $A82A
  3476.         EndM
  3477.     ELSE
  3478.         IMPORT_CFM_FUNCTION    VDSetMasterBlendLevel
  3479.     ENDIF
  3480.  
  3481. ;
  3482. ; pascal VideoDigitizerError VDSetPlayThruDestination(VideoDigitizerComponent ci, PixMapHandle dest, Rect *destRect, MatrixRecord *m, RgnHandle mask)
  3483. ;
  3484.     IF ¬ GENERATINGCFM THEN
  3485.         Macro
  3486.         _VDSetPlayThruDestination
  3487.             dc.w     $2F3C
  3488.             dc.w     $0010
  3489.             dc.w     $002D
  3490.             moveq    #0,d0
  3491.             dc.w     $A82A
  3492.         EndM
  3493.     ELSE
  3494.         IMPORT_CFM_FUNCTION    VDSetPlayThruDestination
  3495.     ENDIF
  3496.  
  3497. ;
  3498. ; pascal VideoDigitizerError VDSetPlayThruOnOff(VideoDigitizerComponent ci, short state)
  3499. ;
  3500.     IF ¬ GENERATINGCFM THEN
  3501.         Macro
  3502.         _VDSetPlayThruOnOff
  3503.             dc.w     $2F3C
  3504.             dc.w     $0002
  3505.             dc.w     $002E
  3506.             moveq    #0,d0
  3507.             dc.w     $A82A
  3508.         EndM
  3509.     ELSE
  3510.         IMPORT_CFM_FUNCTION    VDSetPlayThruOnOff
  3511.     ENDIF
  3512.  
  3513. ;
  3514. ; pascal VideoDigitizerError VDSetFieldPreference(VideoDigitizerComponent ci, short fieldFlag)
  3515. ;
  3516.     IF ¬ GENERATINGCFM THEN
  3517.         Macro
  3518.         _VDSetFieldPreference
  3519.             dc.w     $2F3C
  3520.             dc.w     $0002
  3521.             dc.w     $002F
  3522.             moveq    #0,d0
  3523.             dc.w     $A82A
  3524.         EndM
  3525.     ELSE
  3526.         IMPORT_CFM_FUNCTION    VDSetFieldPreference
  3527.     ENDIF
  3528.  
  3529. ;
  3530. ; pascal VideoDigitizerError VDGetFieldPreference(VideoDigitizerComponent ci, short *fieldFlag)
  3531. ;
  3532.     IF ¬ GENERATINGCFM THEN
  3533.         Macro
  3534.         _VDGetFieldPreference
  3535.             dc.w     $2F3C
  3536.             dc.w     $0004
  3537.             dc.w     $0030
  3538.             moveq    #0,d0
  3539.             dc.w     $A82A
  3540.         EndM
  3541.     ELSE
  3542.         IMPORT_CFM_FUNCTION    VDGetFieldPreference
  3543.     ENDIF
  3544.  
  3545. ;
  3546. ; pascal VideoDigitizerError VDPreflightDestination(VideoDigitizerComponent ci, Rect *digitizerRect, PixMap **dest, Rect *destRect, MatrixRecord *m)
  3547. ;
  3548.     IF ¬ GENERATINGCFM THEN
  3549.         Macro
  3550.         _VDPreflightDestination
  3551.             dc.w     $2F3C
  3552.             dc.w     $0010
  3553.             dc.w     $0032
  3554.             moveq    #0,d0
  3555.             dc.w     $A82A
  3556.         EndM
  3557.     ELSE
  3558.         IMPORT_CFM_FUNCTION    VDPreflightDestination
  3559.     ENDIF
  3560.  
  3561. ;
  3562. ; pascal VideoDigitizerError VDPreflightGlobalRect(VideoDigitizerComponent ci, GrafPtr theWindow, Rect *globalRect)
  3563. ;
  3564.     IF ¬ GENERATINGCFM THEN
  3565.         Macro
  3566.         _VDPreflightGlobalRect
  3567.             dc.w     $2F3C
  3568.             dc.w     $0008
  3569.             dc.w     $0033
  3570.             moveq    #0,d0
  3571.             dc.w     $A82A
  3572.         EndM
  3573.     ELSE
  3574.         IMPORT_CFM_FUNCTION    VDPreflightGlobalRect
  3575.     ENDIF
  3576.  
  3577. ;
  3578. ; pascal VideoDigitizerError VDSetPlayThruGlobalRect(VideoDigitizerComponent ci, GrafPtr theWindow, Rect *globalRect)
  3579. ;
  3580.     IF ¬ GENERATINGCFM THEN
  3581.         Macro
  3582.         _VDSetPlayThruGlobalRect
  3583.             dc.w     $2F3C
  3584.             dc.w     $0008
  3585.             dc.w     $0034
  3586.             moveq    #0,d0
  3587.             dc.w     $A82A
  3588.         EndM
  3589.     ELSE
  3590.         IMPORT_CFM_FUNCTION    VDSetPlayThruGlobalRect
  3591.     ENDIF
  3592.  
  3593. ;
  3594. ; pascal VideoDigitizerError VDSetInputGammaRecord(VideoDigitizerComponent ci, VDGamRecPtr inputGammaPtr)
  3595. ;
  3596.     IF ¬ GENERATINGCFM THEN
  3597.         Macro
  3598.         _VDSetInputGammaRecord
  3599.             dc.w     $2F3C
  3600.             dc.w     $0004
  3601.             dc.w     $0035
  3602.             moveq    #0,d0
  3603.             dc.w     $A82A
  3604.         EndM
  3605.     ELSE
  3606.         IMPORT_CFM_FUNCTION    VDSetInputGammaRecord
  3607.     ENDIF
  3608.  
  3609. ;
  3610. ; pascal VideoDigitizerError VDGetInputGammaRecord(VideoDigitizerComponent ci, VDGamRecPtr *inputGammaPtr)
  3611. ;
  3612.     IF ¬ GENERATINGCFM THEN
  3613.         Macro
  3614.         _VDGetInputGammaRecord
  3615.             dc.w     $2F3C
  3616.             dc.w     $0004
  3617.             dc.w     $0036
  3618.             moveq    #0,d0
  3619.             dc.w     $A82A
  3620.         EndM
  3621.     ELSE
  3622.         IMPORT_CFM_FUNCTION    VDGetInputGammaRecord
  3623.     ENDIF
  3624.  
  3625. ;
  3626. ; pascal VideoDigitizerError VDSetBlackLevelValue(VideoDigitizerComponent ci, unsigned short *blackLevel)
  3627. ;
  3628.     IF ¬ GENERATINGCFM THEN
  3629.         Macro
  3630.         _VDSetBlackLevelValue
  3631.             dc.w     $2F3C
  3632.             dc.w     $0004
  3633.             dc.w     $0037
  3634.             moveq    #0,d0
  3635.             dc.w     $A82A
  3636.         EndM
  3637.     ELSE
  3638.         IMPORT_CFM_FUNCTION    VDSetBlackLevelValue
  3639.     ENDIF
  3640.  
  3641. ;
  3642. ; pascal VideoDigitizerError VDGetBlackLevelValue(VideoDigitizerComponent ci, unsigned short *blackLevel)
  3643. ;
  3644.     IF ¬ GENERATINGCFM THEN
  3645.         Macro
  3646.         _VDGetBlackLevelValue
  3647.             dc.w     $2F3C
  3648.             dc.w     $0004
  3649.             dc.w     $0038
  3650.             moveq    #0,d0
  3651.             dc.w     $A82A
  3652.         EndM
  3653.     ELSE
  3654.         IMPORT_CFM_FUNCTION    VDGetBlackLevelValue
  3655.     ENDIF
  3656.  
  3657. ;
  3658. ; pascal VideoDigitizerError VDSetWhiteLevelValue(VideoDigitizerComponent ci, unsigned short *whiteLevel)
  3659. ;
  3660.     IF ¬ GENERATINGCFM THEN
  3661.         Macro
  3662.         _VDSetWhiteLevelValue
  3663.             dc.w     $2F3C
  3664.             dc.w     $0004
  3665.             dc.w     $0039
  3666.             moveq    #0,d0
  3667.             dc.w     $A82A
  3668.         EndM
  3669.     ELSE
  3670.         IMPORT_CFM_FUNCTION    VDSetWhiteLevelValue
  3671.     ENDIF
  3672.  
  3673. ;
  3674. ; pascal VideoDigitizerError VDGetWhiteLevelValue(VideoDigitizerComponent ci, unsigned short *whiteLevel)
  3675. ;
  3676.     IF ¬ GENERATINGCFM THEN
  3677.         Macro
  3678.         _VDGetWhiteLevelValue
  3679.             dc.w     $2F3C
  3680.             dc.w     $0004
  3681.             dc.w     $003A
  3682.             moveq    #0,d0
  3683.             dc.w     $A82A
  3684.         EndM
  3685.     ELSE
  3686.         IMPORT_CFM_FUNCTION    VDGetWhiteLevelValue
  3687.     ENDIF
  3688.  
  3689. ;
  3690. ; pascal VideoDigitizerError VDGetVideoDefaults(VideoDigitizerComponent ci, unsigned short *blackLevel, unsigned short *whiteLevel, unsigned short *brightness, unsigned short *hue, unsigned short *saturation, unsigned short *contrast, unsigned short *sharpness)
  3691. ;
  3692.     IF ¬ GENERATINGCFM THEN
  3693.         Macro
  3694.         _VDGetVideoDefaults
  3695.             dc.w     $2F3C
  3696.             dc.w     $001C
  3697.             dc.w     $003B
  3698.             moveq    #0,d0
  3699.             dc.w     $A82A
  3700.         EndM
  3701.     ELSE
  3702.         IMPORT_CFM_FUNCTION    VDGetVideoDefaults
  3703.     ENDIF
  3704.  
  3705. ;
  3706. ; pascal VideoDigitizerError VDGetNumberOfInputs(VideoDigitizerComponent ci, short *inputs)
  3707. ;
  3708.     IF ¬ GENERATINGCFM THEN
  3709.         Macro
  3710.         _VDGetNumberOfInputs
  3711.             dc.w     $2F3C
  3712.             dc.w     $0004
  3713.             dc.w     $003C
  3714.             moveq    #0,d0
  3715.             dc.w     $A82A
  3716.         EndM
  3717.     ELSE
  3718.         IMPORT_CFM_FUNCTION    VDGetNumberOfInputs
  3719.     ENDIF
  3720.  
  3721. ;
  3722. ; pascal VideoDigitizerError VDGetInputFormat(VideoDigitizerComponent ci, short input, short *format)
  3723. ;
  3724.     IF ¬ GENERATINGCFM THEN
  3725.         Macro
  3726.         _VDGetInputFormat
  3727.             dc.w     $2F3C
  3728.             dc.w     $0006
  3729.             dc.w     $003D
  3730.             moveq    #0,d0
  3731.             dc.w     $A82A
  3732.         EndM
  3733.     ELSE
  3734.         IMPORT_CFM_FUNCTION    VDGetInputFormat
  3735.     ENDIF
  3736.  
  3737. ;
  3738. ; pascal VideoDigitizerError VDSetInput(VideoDigitizerComponent ci, short input)
  3739. ;
  3740.     IF ¬ GENERATINGCFM THEN
  3741.         Macro
  3742.         _VDSetInput
  3743.             dc.w     $2F3C
  3744.             dc.w     $0002
  3745.             dc.w     $003E
  3746.             moveq    #0,d0
  3747.             dc.w     $A82A
  3748.         EndM
  3749.     ELSE
  3750.         IMPORT_CFM_FUNCTION    VDSetInput
  3751.     ENDIF
  3752.  
  3753. ;
  3754. ; pascal VideoDigitizerError VDGetInput(VideoDigitizerComponent ci, short *input)
  3755. ;
  3756.     IF ¬ GENERATINGCFM THEN
  3757.         Macro
  3758.         _VDGetInput
  3759.             dc.w     $2F3C
  3760.             dc.w     $0004
  3761.             dc.w     $003F
  3762.             moveq    #0,d0
  3763.             dc.w     $A82A
  3764.         EndM
  3765.     ELSE
  3766.         IMPORT_CFM_FUNCTION    VDGetInput
  3767.     ENDIF
  3768.  
  3769. ;
  3770. ; pascal VideoDigitizerError VDSetInputStandard(VideoDigitizerComponent ci, short inputStandard)
  3771. ;
  3772.     IF ¬ GENERATINGCFM THEN
  3773.         Macro
  3774.         _VDSetInputStandard
  3775.             dc.w     $2F3C
  3776.             dc.w     $0002
  3777.             dc.w     $0040
  3778.             moveq    #0,d0
  3779.             dc.w     $A82A
  3780.         EndM
  3781.     ELSE
  3782.         IMPORT_CFM_FUNCTION    VDSetInputStandard
  3783.     ENDIF
  3784.  
  3785. ;
  3786. ; pascal VideoDigitizerError VDSetupBuffers(VideoDigitizerComponent ci, VdigBufferRecListHandle bufferList)
  3787. ;
  3788.     IF ¬ GENERATINGCFM THEN
  3789.         Macro
  3790.         _VDSetupBuffers
  3791.             dc.w     $2F3C
  3792.             dc.w     $0004
  3793.             dc.w     $0041
  3794.             moveq    #0,d0
  3795.             dc.w     $A82A
  3796.         EndM
  3797.     ELSE
  3798.         IMPORT_CFM_FUNCTION    VDSetupBuffers
  3799.     ENDIF
  3800.  
  3801. ;
  3802. ; pascal VideoDigitizerError VDGrabOneFrameAsync(VideoDigitizerComponent ci, short buffer)
  3803. ;
  3804.     IF ¬ GENERATINGCFM THEN
  3805.         Macro
  3806.         _VDGrabOneFrameAsync
  3807.             dc.w     $2F3C
  3808.             dc.w     $0002
  3809.             dc.w     $0042
  3810.             moveq    #0,d0
  3811.             dc.w     $A82A
  3812.         EndM
  3813.     ELSE
  3814.         IMPORT_CFM_FUNCTION    VDGrabOneFrameAsync
  3815.     ENDIF
  3816.  
  3817. ;
  3818. ; pascal VideoDigitizerError VDDone(VideoDigitizerComponent ci, short buffer)
  3819. ;
  3820.     IF ¬ GENERATINGCFM THEN
  3821.         Macro
  3822.         _VDDone
  3823.             dc.w     $2F3C
  3824.             dc.w     $0002
  3825.             dc.w     $0043
  3826.             moveq    #0,d0
  3827.             dc.w     $A82A
  3828.         EndM
  3829.     ELSE
  3830.         IMPORT_CFM_FUNCTION    VDDone
  3831.     ENDIF
  3832.  
  3833. ;
  3834. ; pascal VideoDigitizerError VDSetCompression(VideoDigitizerComponent ci, OSType compressType, short depth, Rect *bounds, CodecQ spatialQuality, CodecQ temporalQuality, long keyFrameRate)
  3835. ;
  3836.     IF ¬ GENERATINGCFM THEN
  3837.         Macro
  3838.         _VDSetCompression
  3839.             dc.w     $2F3C
  3840.             dc.w     $0016
  3841.             dc.w     $0044
  3842.             moveq    #0,d0
  3843.             dc.w     $A82A
  3844.         EndM
  3845.     ELSE
  3846.         IMPORT_CFM_FUNCTION    VDSetCompression
  3847.     ENDIF
  3848.  
  3849. ;
  3850. ; pascal VideoDigitizerError VDCompressOneFrameAsync(VideoDigitizerComponent ci)
  3851. ;
  3852.     IF ¬ GENERATINGCFM THEN
  3853.         Macro
  3854.         _VDCompressOneFrameAsync
  3855.             dc.w     $2F3C
  3856.             dc.w     $0000
  3857.             dc.w     $0045
  3858.             moveq    #0,d0
  3859.             dc.w     $A82A
  3860.         EndM
  3861.     ELSE
  3862.         IMPORT_CFM_FUNCTION    VDCompressOneFrameAsync
  3863.     ENDIF
  3864.  
  3865. ;
  3866. ; pascal VideoDigitizerError VDCompressDone(VideoDigitizerComponent ci, Boolean *done, Ptr *theData, long *dataSize, UInt8 *similarity, TimeRecord *t)
  3867. ;
  3868.     IF ¬ GENERATINGCFM THEN
  3869.         Macro
  3870.         _VDCompressDone
  3871.             dc.w     $2F3C
  3872.             dc.w     $0014
  3873.             dc.w     $0046
  3874.             moveq    #0,d0
  3875.             dc.w     $A82A
  3876.         EndM
  3877.     ELSE
  3878.         IMPORT_CFM_FUNCTION    VDCompressDone
  3879.     ENDIF
  3880.  
  3881. ;
  3882. ; pascal VideoDigitizerError VDReleaseCompressBuffer(VideoDigitizerComponent ci, Ptr bufferAddr)
  3883. ;
  3884.     IF ¬ GENERATINGCFM THEN
  3885.         Macro
  3886.         _VDReleaseCompressBuffer
  3887.             dc.w     $2F3C
  3888.             dc.w     $0004
  3889.             dc.w     $0047
  3890.             moveq    #0,d0
  3891.             dc.w     $A82A
  3892.         EndM
  3893.     ELSE
  3894.         IMPORT_CFM_FUNCTION    VDReleaseCompressBuffer
  3895.     ENDIF
  3896.  
  3897. ;
  3898. ; pascal VideoDigitizerError VDGetImageDescription(VideoDigitizerComponent ci, ImageDescriptionHandle desc)
  3899. ;
  3900.     IF ¬ GENERATINGCFM THEN
  3901.         Macro
  3902.         _VDGetImageDescription
  3903.             dc.w     $2F3C
  3904.             dc.w     $0004
  3905.             dc.w     $0048
  3906.             moveq    #0,d0
  3907.             dc.w     $A82A
  3908.         EndM
  3909.     ELSE
  3910.         IMPORT_CFM_FUNCTION    VDGetImageDescription
  3911.     ENDIF
  3912.  
  3913. ;
  3914. ; pascal VideoDigitizerError VDResetCompressSequence(VideoDigitizerComponent ci)
  3915. ;
  3916.     IF ¬ GENERATINGCFM THEN
  3917.         Macro
  3918.         _VDResetCompressSequence
  3919.             dc.w     $2F3C
  3920.             dc.w     $0000
  3921.             dc.w     $0049
  3922.             moveq    #0,d0
  3923.             dc.w     $A82A
  3924.         EndM
  3925.     ELSE
  3926.         IMPORT_CFM_FUNCTION    VDResetCompressSequence
  3927.     ENDIF
  3928.  
  3929. ;
  3930. ; pascal VideoDigitizerError VDSetCompressionOnOff(VideoDigitizerComponent ci, Boolean state)
  3931. ;
  3932.     IF ¬ GENERATINGCFM THEN
  3933.         Macro
  3934.         _VDSetCompressionOnOff
  3935.             dc.w     $2F3C
  3936.             dc.w     $0002
  3937.             dc.w     $004A
  3938.             moveq    #0,d0
  3939.             dc.w     $A82A
  3940.         EndM
  3941.     ELSE
  3942.         IMPORT_CFM_FUNCTION    VDSetCompressionOnOff
  3943.     ENDIF
  3944.  
  3945. ;
  3946. ; pascal VideoDigitizerError VDGetCompressionTypes(VideoDigitizerComponent ci, VDCompressionListHandle h)
  3947. ;
  3948.     IF ¬ GENERATINGCFM THEN
  3949.         Macro
  3950.         _VDGetCompressionTypes
  3951.             dc.w     $2F3C
  3952.             dc.w     $0004
  3953.             dc.w     $004B
  3954.             moveq    #0,d0
  3955.             dc.w     $A82A
  3956.         EndM
  3957.     ELSE
  3958.         IMPORT_CFM_FUNCTION    VDGetCompressionTypes
  3959.     ENDIF
  3960.  
  3961. ;
  3962. ; pascal VideoDigitizerError VDSetTimeBase(VideoDigitizerComponent ci, TimeBase t)
  3963. ;
  3964.     IF ¬ GENERATINGCFM THEN
  3965.         Macro
  3966.         _VDSetTimeBase
  3967.             dc.w     $2F3C
  3968.             dc.w     $0004
  3969.             dc.w     $004C
  3970.             moveq    #0,d0
  3971.             dc.w     $A82A
  3972.         EndM
  3973.     ELSE
  3974.         IMPORT_CFM_FUNCTION    VDSetTimeBase
  3975.     ENDIF
  3976.  
  3977. ;
  3978. ; pascal VideoDigitizerError VDSetFrameRate(VideoDigitizerComponent ci, Fixed framesPerSecond)
  3979. ;
  3980.     IF ¬ GENERATINGCFM THEN
  3981.         Macro
  3982.         _VDSetFrameRate
  3983.             dc.w     $2F3C
  3984.             dc.w     $0004
  3985.             dc.w     $004D
  3986.             moveq    #0,d0
  3987.             dc.w     $A82A
  3988.         EndM
  3989.     ELSE
  3990.         IMPORT_CFM_FUNCTION    VDSetFrameRate
  3991.     ENDIF
  3992.  
  3993. ;
  3994. ; pascal VideoDigitizerError VDGetDataRate(VideoDigitizerComponent ci, long *milliSecPerFrame, Fixed *framesPerSecond, long *bytesPerSecond)
  3995. ;
  3996.     IF ¬ GENERATINGCFM THEN
  3997.         Macro
  3998.         _VDGetDataRate
  3999.             dc.w     $2F3C
  4000.             dc.w     $000C
  4001.             dc.w     $004E
  4002.             moveq    #0,d0
  4003.             dc.w     $A82A
  4004.         EndM
  4005.     ELSE
  4006.         IMPORT_CFM_FUNCTION    VDGetDataRate
  4007.     ENDIF
  4008.  
  4009. ;
  4010. ; pascal VideoDigitizerError VDGetSoundInputDriver(VideoDigitizerComponent ci, Str255 soundDriverName)
  4011. ;
  4012.     IF ¬ GENERATINGCFM THEN
  4013.         Macro
  4014.         _VDGetSoundInputDriver
  4015.             dc.w     $2F3C
  4016.             dc.w     $0004
  4017.             dc.w     $004F
  4018.             moveq    #0,d0
  4019.             dc.w     $A82A
  4020.         EndM
  4021.     ELSE
  4022.         IMPORT_CFM_FUNCTION    VDGetSoundInputDriver
  4023.     ENDIF
  4024.  
  4025. ;
  4026. ; pascal VideoDigitizerError VDGetDMADepths(VideoDigitizerComponent ci, long *depthArray, long *preferredDepth)
  4027. ;
  4028.     IF ¬ GENERATINGCFM THEN
  4029.         Macro
  4030.         _VDGetDMADepths
  4031.             dc.w     $2F3C
  4032.             dc.w     $0008
  4033.             dc.w     $0050
  4034.             moveq    #0,d0
  4035.             dc.w     $A82A
  4036.         EndM
  4037.     ELSE
  4038.         IMPORT_CFM_FUNCTION    VDGetDMADepths
  4039.     ENDIF
  4040.  
  4041. ;
  4042. ; pascal VideoDigitizerError VDGetPreferredTimeScale(VideoDigitizerComponent ci, TimeScale *preferred)
  4043. ;
  4044.     IF ¬ GENERATINGCFM THEN
  4045.         Macro
  4046.         _VDGetPreferredTimeScale
  4047.             dc.w     $2F3C
  4048.             dc.w     $0004
  4049.             dc.w     $0051
  4050.             moveq    #0,d0
  4051.             dc.w     $A82A
  4052.         EndM
  4053.     ELSE
  4054.         IMPORT_CFM_FUNCTION    VDGetPreferredTimeScale
  4055.     ENDIF
  4056.  
  4057. ;
  4058. ; pascal VideoDigitizerError VDReleaseAsyncBuffers(VideoDigitizerComponent ci)
  4059. ;
  4060.     IF ¬ GENERATINGCFM THEN
  4061.         Macro
  4062.         _VDReleaseAsyncBuffers
  4063.             dc.w     $2F3C
  4064.             dc.w     $0000
  4065.             dc.w     $0052
  4066.             moveq    #0,d0
  4067.             dc.w     $A82A
  4068.         EndM
  4069.     ELSE
  4070.         IMPORT_CFM_FUNCTION    VDReleaseAsyncBuffers
  4071.     ENDIF
  4072.  
  4073. ; 83 is reserved for compatibility reasons 
  4074. ;
  4075. ; pascal VideoDigitizerError VDSetDataRate(VideoDigitizerComponent ci, long bytesPerSecond)
  4076. ;
  4077.     IF ¬ GENERATINGCFM THEN
  4078.         Macro
  4079.         _VDSetDataRate
  4080.             dc.w     $2F3C
  4081.             dc.w     $0004
  4082.             dc.w     $0054
  4083.             moveq    #0,d0
  4084.             dc.w     $A82A
  4085.         EndM
  4086.     ELSE
  4087.         IMPORT_CFM_FUNCTION    VDSetDataRate
  4088.     ENDIF
  4089.  
  4090. ;
  4091. ; pascal VideoDigitizerError VDGetTimeCode(VideoDigitizerComponent ci, TimeRecord *atTime, void *timeCodeFormat, void *timeCodeTime)
  4092. ;
  4093.     IF ¬ GENERATINGCFM THEN
  4094.         Macro
  4095.         _VDGetTimeCode
  4096.             dc.w     $2F3C
  4097.             dc.w     $000C
  4098.             dc.w     $0055
  4099.             moveq    #0,d0
  4100.             dc.w     $A82A
  4101.         EndM
  4102.     ELSE
  4103.         IMPORT_CFM_FUNCTION    VDGetTimeCode
  4104.     ENDIF
  4105.  
  4106. ;
  4107. ; pascal VideoDigitizerError VDUseSafeBuffers(VideoDigitizerComponent ci, Boolean useSafeBuffers)
  4108. ;
  4109.     IF ¬ GENERATINGCFM THEN
  4110.         Macro
  4111.         _VDUseSafeBuffers
  4112.             dc.w     $2F3C
  4113.             dc.w     $0002
  4114.             dc.w     $0056
  4115.             moveq    #0,d0
  4116.             dc.w     $A82A
  4117.         EndM
  4118.     ELSE
  4119.         IMPORT_CFM_FUNCTION    VDUseSafeBuffers
  4120.     ENDIF
  4121.  
  4122. kSelectVDGetMaxSrcRect            EQU        $1
  4123. kSelectVDGetActiveSrcRect        EQU        $2
  4124. kSelectVDSetDigitizerRect        EQU        $3
  4125. kSelectVDGetDigitizerRect        EQU        $4
  4126. kSelectVDGetVBlankRect            EQU        $5
  4127. kSelectVDGetMaskPixMap            EQU        $6
  4128. kSelectVDGetPlayThruDestination    EQU        $8
  4129. kSelectVDUseThisCLUT            EQU        $9
  4130. kSelectVDSetInputGammaValue        EQU        $A
  4131. kSelectVDGetInputGammaValue        EQU        $B
  4132. kSelectVDSetBrightness            EQU        $C
  4133. kSelectVDGetBrightness            EQU        $D
  4134. kSelectVDSetContrast            EQU        $E
  4135. kSelectVDSetHue                    EQU        $F
  4136. kSelectVDSetSharpness            EQU        $10
  4137. kSelectVDSetSaturation            EQU        $11
  4138. kSelectVDGetContrast            EQU        $12
  4139. kSelectVDGetHue                    EQU        $13
  4140. kSelectVDGetSharpness            EQU        $14
  4141. kSelectVDGetSaturation            EQU        $15
  4142. kSelectVDGrabOneFrame            EQU        $16
  4143. kSelectVDGetMaxAuxBuffer        EQU        $17
  4144. kSelectVDGetDigitizerInfo        EQU        $19
  4145. kSelectVDGetCurrentFlags        EQU        $1A
  4146. kSelectVDSetKeyColor            EQU        $1B
  4147. kSelectVDGetKeyColor            EQU        $1C
  4148. kSelectVDAddKeyColor            EQU        $1D
  4149. kSelectVDGetNextKeyColor        EQU        $1E
  4150. kSelectVDSetKeyColorRange        EQU        $1F
  4151. kSelectVDGetKeyColorRange        EQU        $20
  4152. kSelectVDSetDigitizerUserInterrupt EQU        $21
  4153. kSelectVDSetInputColorSpaceMode    EQU        $22
  4154. kSelectVDGetInputColorSpaceMode    EQU        $23
  4155. kSelectVDSetClipState            EQU        $24
  4156. kSelectVDGetClipState            EQU        $25
  4157. kSelectVDSetClipRgn                EQU        $26
  4158. kSelectVDClearClipRgn            EQU        $27
  4159. kSelectVDGetCLUTInUse            EQU        $28
  4160. kSelectVDSetPLLFilterType        EQU        $29
  4161. kSelectVDGetPLLFilterType        EQU        $2A
  4162. kSelectVDGetMaskandValue        EQU        $2B
  4163. kSelectVDSetMasterBlendLevel    EQU        $2C
  4164. kSelectVDSetPlayThruDestination    EQU        $2D
  4165. kSelectVDSetPlayThruOnOff        EQU        $2E
  4166. kSelectVDSetFieldPreference        EQU        $2F
  4167. kSelectVDGetFieldPreference        EQU        $30
  4168. kSelectVDPreflightDestination    EQU        $32
  4169. kSelectVDPreflightGlobalRect    EQU        $33
  4170. kSelectVDSetPlayThruGlobalRect    EQU        $34
  4171. kSelectVDSetInputGammaRecord    EQU        $35
  4172. kSelectVDGetInputGammaRecord    EQU        $36
  4173. kSelectVDSetBlackLevelValue        EQU        $37
  4174. kSelectVDGetBlackLevelValue        EQU        $38
  4175. kSelectVDSetWhiteLevelValue        EQU        $39
  4176. kSelectVDGetWhiteLevelValue        EQU        $3A
  4177. kSelectVDGetVideoDefaults        EQU        $3B
  4178. kSelectVDGetNumberOfInputs        EQU        $3C
  4179. kSelectVDGetInputFormat            EQU        $3D
  4180. kSelectVDSetInput                EQU        $3E
  4181. kSelectVDGetInput                EQU        $3F
  4182. kSelectVDSetInputStandard        EQU        $40
  4183. kSelectVDSetupBuffers            EQU        $41
  4184. kSelectVDGrabOneFrameAsync        EQU        $42
  4185. kSelectVDDone                    EQU        $43
  4186. kSelectVDSetCompression            EQU        $44
  4187. kSelectVDCompressOneFrameAsync    EQU        $45
  4188. kSelectVDCompressDone            EQU        $46
  4189. kSelectVDReleaseCompressBuffer    EQU        $47
  4190. kSelectVDGetImageDescription    EQU        $48
  4191. kSelectVDResetCompressSequence    EQU        $49
  4192. kSelectVDSetCompressionOnOff    EQU        $4A
  4193. kSelectVDGetCompressionTypes    EQU        $4B
  4194. kSelectVDSetTimeBase            EQU        $4C
  4195. kSelectVDSetFrameRate            EQU        $4D
  4196. kSelectVDGetDataRate            EQU        $4E
  4197. kSelectVDGetSoundInputDriver    EQU        $4F
  4198. kSelectVDGetDMADepths            EQU        $50
  4199. kSelectVDGetPreferredTimeScale    EQU        $51
  4200. kSelectVDReleaseAsyncBuffers    EQU        $52
  4201. kSelectVDSetDataRate            EQU        $54
  4202. kSelectVDGetTimeCode            EQU        $55
  4203. kSelectVDUseSafeBuffers            EQU        $56
  4204.  
  4205. StandardCompressionType            EQU        'scdi'
  4206. StandardCompressionSubType        EQU        'imag'
  4207.  
  4208. scListEveryCodec                EQU        1 << 1
  4209. scAllowZeroFrameRate            EQU        1 << 2
  4210. scAllowZeroKeyFrameRate            EQU        1 << 3
  4211. scShowBestDepth                    EQU        1 << 4
  4212. scUseMovableModal                EQU        1 << 5
  4213.  
  4214. ;    Possible test flags for setting test image.
  4215. scPreferCropping                EQU        1 << 0
  4216. scPreferScaling                    EQU        1 << 1
  4217. scPreferScalingAndCropping        EQU        scPreferScaling | scPreferCropping
  4218.  
  4219. ;    Dimensions of the image preview box.
  4220. scTestImageWidth                EQU        80
  4221. scTestImageHeight                EQU        80
  4222.  
  4223. ;    Possible items returned by hookProc.
  4224. scOKItem                        EQU        1
  4225. scCancelItem                    EQU        2
  4226. scCustomItem                    EQU        3
  4227.  
  4228. ;    Result returned when user cancelled.
  4229. scUserCancelled                    EQU        1
  4230.  
  4231. SCSpatialSettings         RECORD    0
  4232. codecType                 ds.l   1        ; offset: $0 (0)
  4233. codec                     ds.l   1        ; offset: $4 (4)
  4234. depth                     ds.w   1        ; offset: $8 (8)
  4235. spatialQuality             ds.l   1        ; offset: $A (10)
  4236. sizeof                     EQU *            ; size:   $E (14)
  4237.                         ENDR
  4238.  
  4239. ; typedef struct SCSpatialSettings  SCSpatialSettings
  4240. SCTemporalSettings         RECORD    0
  4241. temporalQuality             ds.l   1        ; offset: $0 (0)
  4242. frameRate                 ds.l   1        ; offset: $4 (4)
  4243. keyFrameRate             ds.l   1        ; offset: $8 (8)
  4244. sizeof                     EQU *            ; size:   $C (12)
  4245.                         ENDR
  4246.  
  4247. ; typedef struct SCTemporalSettings  SCTemporalSettings
  4248. SCDataRateSettings         RECORD    0
  4249. dataRate                 ds.l   1        ; offset: $0 (0)
  4250. frameDuration             ds.l   1        ; offset: $4 (4)
  4251. minSpatialQuality         ds.l   1        ; offset: $8 (8)
  4252. minTemporalQuality         ds.l   1        ; offset: $C (12)
  4253. sizeof                     EQU *            ; size:   $10 (16)
  4254.                         ENDR
  4255.  
  4256. ; typedef struct SCDataRateSettings  SCDataRateSettings
  4257. SCExtendedProcs         RECORD    0
  4258. filterProc                 ds.l   1        ; offset: $0 (0)
  4259. hookProc                 ds.l   1        ; offset: $4 (4)
  4260. refcon                     ds.l   1        ; offset: $8 (8)
  4261. customName                 ds.l   8        ; offset: $C (12)
  4262. sizeof                     EQU *            ; size:   $2C (44)
  4263.                         ENDR
  4264.  
  4265. ; typedef struct SCExtendedProcs  SCExtendedProcs
  4266. ;    Get/SetInfo selectors
  4267.  
  4268. scSpatialSettingsType            EQU        'sptl'                ; pointer to SCSpatialSettings struct
  4269. scTemporalSettingsType            EQU        'tprl'                ; pointer to SCTemporalSettings struct
  4270. scDataRateSettingsType            EQU        'drat'                ; pointer to SCDataRateSettings struct
  4271. scColorTableType                EQU        'clut'                ; pointer to CTabHandle
  4272. scProgressProcType                EQU        'prog'                ; pointer to ProgressRecord struct
  4273. scExtendedProcsType                EQU        'xprc'                ; pointer to SCExtendedProcs struct
  4274. scPreferenceFlagsType            EQU        'pref'                ; pointer to long
  4275. scSettingsStateType                EQU        'ssta'                ; pointer to Handle
  4276. scSequenceIDType                EQU        'sequ'                ; pointer to ImageSequence
  4277. scWindowPositionType            EQU        'wndw'                ; pointer to Point
  4278. scCodecFlagsType                EQU        'cflg'                ; pointer to CodecFlags
  4279. scCodecSettingsType                EQU        'cdec'                ; pointer to Handle
  4280. scForceKeyValueType                EQU        'ksim'
  4281.  
  4282. ;    scTypeNotFoundErr returned by Get/SetInfo when type cannot be found.
  4283. ;* These are Progress procedures *
  4284. ;
  4285. ; pascal ComponentResult SCPositionRect(ComponentInstance ci, Rect *rp, Point *where)
  4286. ;
  4287.     IF ¬ GENERATINGCFM THEN
  4288.         Macro
  4289.         _SCPositionRect
  4290.             dc.w     $2F3C
  4291.             dc.w     $0008
  4292.             dc.w     $0002
  4293.             moveq    #0,d0
  4294.             dc.w     $A82A
  4295.         EndM
  4296.     ELSE
  4297.         IMPORT_CFM_FUNCTION    SCPositionRect
  4298.     ENDIF
  4299.  
  4300. ;
  4301. ; pascal ComponentResult SCPositionDialog(ComponentInstance ci, short id, Point *where)
  4302. ;
  4303.     IF ¬ GENERATINGCFM THEN
  4304.         Macro
  4305.         _SCPositionDialog
  4306.             dc.w     $2F3C
  4307.             dc.w     $0006
  4308.             dc.w     $0003
  4309.             moveq    #0,d0
  4310.             dc.w     $A82A
  4311.         EndM
  4312.     ELSE
  4313.         IMPORT_CFM_FUNCTION    SCPositionDialog
  4314.     ENDIF
  4315.  
  4316. ;
  4317. ; pascal ComponentResult SCSetTestImagePictHandle(ComponentInstance ci, PicHandle testPict, Rect *testRect, short testFlags)
  4318. ;
  4319.     IF ¬ GENERATINGCFM THEN
  4320.         Macro
  4321.         _SCSetTestImagePictHandle
  4322.             dc.w     $2F3C
  4323.             dc.w     $000A
  4324.             dc.w     $0004
  4325.             moveq    #0,d0
  4326.             dc.w     $A82A
  4327.         EndM
  4328.     ELSE
  4329.         IMPORT_CFM_FUNCTION    SCSetTestImagePictHandle
  4330.     ENDIF
  4331.  
  4332. ;
  4333. ; pascal ComponentResult SCSetTestImagePictFile(ComponentInstance ci, short testFileRef, Rect *testRect, short testFlags)
  4334. ;
  4335.     IF ¬ GENERATINGCFM THEN
  4336.         Macro
  4337.         _SCSetTestImagePictFile
  4338.             dc.w     $2F3C
  4339.             dc.w     $0008
  4340.             dc.w     $0005
  4341.             moveq    #0,d0
  4342.             dc.w     $A82A
  4343.         EndM
  4344.     ELSE
  4345.         IMPORT_CFM_FUNCTION    SCSetTestImagePictFile
  4346.     ENDIF
  4347.  
  4348. ;
  4349. ; pascal ComponentResult SCSetTestImagePixMap(ComponentInstance ci, PixMapHandle testPixMap, Rect *testRect, short testFlags)
  4350. ;
  4351.     IF ¬ GENERATINGCFM THEN
  4352.         Macro
  4353.         _SCSetTestImagePixMap
  4354.             dc.w     $2F3C
  4355.             dc.w     $000A
  4356.             dc.w     $0006
  4357.             moveq    #0,d0
  4358.             dc.w     $A82A
  4359.         EndM
  4360.     ELSE
  4361.         IMPORT_CFM_FUNCTION    SCSetTestImagePixMap
  4362.     ENDIF
  4363.  
  4364. ;
  4365. ; pascal ComponentResult SCGetBestDeviceRect(ComponentInstance ci, Rect *r)
  4366. ;
  4367.     IF ¬ GENERATINGCFM THEN
  4368.         Macro
  4369.         _SCGetBestDeviceRect
  4370.             dc.w     $2F3C
  4371.             dc.w     $0004
  4372.             dc.w     $0007
  4373.             moveq    #0,d0
  4374.             dc.w     $A82A
  4375.         EndM
  4376.     ELSE
  4377.         IMPORT_CFM_FUNCTION    SCGetBestDeviceRect
  4378.     ENDIF
  4379.  
  4380. ;
  4381. ; pascal ComponentResult SCRequestImageSettings(ComponentInstance ci)
  4382. ;
  4383.     IF ¬ GENERATINGCFM THEN
  4384.         Macro
  4385.         _SCRequestImageSettings
  4386.             dc.w     $2F3C
  4387.             dc.w     $0000
  4388.             dc.w     $000A
  4389.             moveq    #0,d0
  4390.             dc.w     $A82A
  4391.         EndM
  4392.     ELSE
  4393.         IMPORT_CFM_FUNCTION    SCRequestImageSettings
  4394.     ENDIF
  4395.  
  4396. ;
  4397. ; pascal ComponentResult SCCompressImage(ComponentInstance ci, PixMapHandle src, const Rect *srcRect, ImageDescriptionHandle *desc, Handle *data)
  4398. ;
  4399.     IF ¬ GENERATINGCFM THEN
  4400.         Macro
  4401.         _SCCompressImage
  4402.             dc.w     $2F3C
  4403.             dc.w     $0010
  4404.             dc.w     $000B
  4405.             moveq    #0,d0
  4406.             dc.w     $A82A
  4407.         EndM
  4408.     ELSE
  4409.         IMPORT_CFM_FUNCTION    SCCompressImage
  4410.     ENDIF
  4411.  
  4412. ;
  4413. ; pascal ComponentResult SCCompressPicture(ComponentInstance ci, PicHandle srcPicture, PicHandle dstPicture)
  4414. ;
  4415.     IF ¬ GENERATINGCFM THEN
  4416.         Macro
  4417.         _SCCompressPicture
  4418.             dc.w     $2F3C
  4419.             dc.w     $0008
  4420.             dc.w     $000C
  4421.             moveq    #0,d0
  4422.             dc.w     $A82A
  4423.         EndM
  4424.     ELSE
  4425.         IMPORT_CFM_FUNCTION    SCCompressPicture
  4426.     ENDIF
  4427.  
  4428. ;
  4429. ; pascal ComponentResult SCCompressPictureFile(ComponentInstance ci, short srcRefNum, short dstRefNum)
  4430. ;
  4431.     IF ¬ GENERATINGCFM THEN
  4432.         Macro
  4433.         _SCCompressPictureFile
  4434.             dc.w     $2F3C
  4435.             dc.w     $0004
  4436.             dc.w     $000D
  4437.             moveq    #0,d0
  4438.             dc.w     $A82A
  4439.         EndM
  4440.     ELSE
  4441.         IMPORT_CFM_FUNCTION    SCCompressPictureFile
  4442.     ENDIF
  4443.  
  4444. ;
  4445. ; pascal ComponentResult SCRequestSequenceSettings(ComponentInstance ci)
  4446. ;
  4447.     IF ¬ GENERATINGCFM THEN
  4448.         Macro
  4449.         _SCRequestSequenceSettings
  4450.             dc.w     $2F3C
  4451.             dc.w     $0000
  4452.             dc.w     $000E
  4453.             moveq    #0,d0
  4454.             dc.w     $A82A
  4455.         EndM
  4456.     ELSE
  4457.         IMPORT_CFM_FUNCTION    SCRequestSequenceSettings
  4458.     ENDIF
  4459.  
  4460. ;
  4461. ; pascal ComponentResult SCCompressSequenceBegin(ComponentInstance ci, PixMapHandle src, const Rect *srcRect, ImageDescriptionHandle *desc)
  4462. ;
  4463.     IF ¬ GENERATINGCFM THEN
  4464.         Macro
  4465.         _SCCompressSequenceBegin
  4466.             dc.w     $2F3C
  4467.             dc.w     $000C
  4468.             dc.w     $000F
  4469.             moveq    #0,d0
  4470.             dc.w     $A82A
  4471.         EndM
  4472.     ELSE
  4473.         IMPORT_CFM_FUNCTION    SCCompressSequenceBegin
  4474.     ENDIF
  4475.  
  4476. ;
  4477. ; pascal ComponentResult SCCompressSequenceFrame(ComponentInstance ci, PixMapHandle src, const Rect *srcRect, Handle *data, long *dataSize, short *notSyncFlag)
  4478. ;
  4479.     IF ¬ GENERATINGCFM THEN
  4480.         Macro
  4481.         _SCCompressSequenceFrame
  4482.             dc.w     $2F3C
  4483.             dc.w     $0014
  4484.             dc.w     $0010
  4485.             moveq    #0,d0
  4486.             dc.w     $A82A
  4487.         EndM
  4488.     ELSE
  4489.         IMPORT_CFM_FUNCTION    SCCompressSequenceFrame
  4490.     ENDIF
  4491.  
  4492. ;
  4493. ; pascal ComponentResult SCCompressSequenceEnd(ComponentInstance ci)
  4494. ;
  4495.     IF ¬ GENERATINGCFM THEN
  4496.         Macro
  4497.         _SCCompressSequenceEnd
  4498.             dc.w     $2F3C
  4499.             dc.w     $0000
  4500.             dc.w     $0011
  4501.             moveq    #0,d0
  4502.             dc.w     $A82A
  4503.         EndM
  4504.     ELSE
  4505.         IMPORT_CFM_FUNCTION    SCCompressSequenceEnd
  4506.     ENDIF
  4507.  
  4508. ;
  4509. ; pascal ComponentResult SCDefaultPictHandleSettings(ComponentInstance ci, PicHandle srcPicture, short motion)
  4510. ;
  4511.     IF ¬ GENERATINGCFM THEN
  4512.         Macro
  4513.         _SCDefaultPictHandleSettings
  4514.             dc.w     $2F3C
  4515.             dc.w     $0006
  4516.             dc.w     $0012
  4517.             moveq    #0,d0
  4518.             dc.w     $A82A
  4519.         EndM
  4520.     ELSE
  4521.         IMPORT_CFM_FUNCTION    SCDefaultPictHandleSettings
  4522.     ENDIF
  4523.  
  4524. ;
  4525. ; pascal ComponentResult SCDefaultPictFileSettings(ComponentInstance ci, short srcRef, short motion)
  4526. ;
  4527.     IF ¬ GENERATINGCFM THEN
  4528.         Macro
  4529.         _SCDefaultPictFileSettings
  4530.             dc.w     $2F3C
  4531.             dc.w     $0004
  4532.             dc.w     $0013
  4533.             moveq    #0,d0
  4534.             dc.w     $A82A
  4535.         EndM
  4536.     ELSE
  4537.         IMPORT_CFM_FUNCTION    SCDefaultPictFileSettings
  4538.     ENDIF
  4539.  
  4540. ;
  4541. ; pascal ComponentResult SCDefaultPixMapSettings(ComponentInstance ci, PixMapHandle src, short motion)
  4542. ;
  4543.     IF ¬ GENERATINGCFM THEN
  4544.         Macro
  4545.         _SCDefaultPixMapSettings
  4546.             dc.w     $2F3C
  4547.             dc.w     $0006
  4548.             dc.w     $0014
  4549.             moveq    #0,d0
  4550.             dc.w     $A82A
  4551.         EndM
  4552.     ELSE
  4553.         IMPORT_CFM_FUNCTION    SCDefaultPixMapSettings
  4554.     ENDIF
  4555.  
  4556. ;
  4557. ; pascal ComponentResult SCGetInfo(ComponentInstance ci, OSType infoType, void *info)
  4558. ;
  4559.     IF ¬ GENERATINGCFM THEN
  4560.         Macro
  4561.         _SCGetInfo
  4562.             dc.w     $2F3C
  4563.             dc.w     $0008
  4564.             dc.w     $0015
  4565.             moveq    #0,d0
  4566.             dc.w     $A82A
  4567.         EndM
  4568.     ELSE
  4569.         IMPORT_CFM_FUNCTION    SCGetInfo
  4570.     ENDIF
  4571.  
  4572. ;
  4573. ; pascal ComponentResult SCSetInfo(ComponentInstance ci, OSType infoType, void *info)
  4574. ;
  4575.     IF ¬ GENERATINGCFM THEN
  4576.         Macro
  4577.         _SCSetInfo
  4578.             dc.w     $2F3C
  4579.             dc.w     $0008
  4580.             dc.w     $0016
  4581.             moveq    #0,d0
  4582.             dc.w     $A82A
  4583.         EndM
  4584.     ELSE
  4585.         IMPORT_CFM_FUNCTION    SCSetInfo
  4586.     ENDIF
  4587.  
  4588. ;
  4589. ; pascal ComponentResult SCNewGWorld(ComponentInstance ci, GWorldPtr *gwp, Rect *rp, GWorldFlags flags)
  4590. ;
  4591.     IF ¬ GENERATINGCFM THEN
  4592.         Macro
  4593.         _SCNewGWorld
  4594.             dc.w     $2F3C
  4595.             dc.w     $000C
  4596.             dc.w     $0017
  4597.             moveq    #0,d0
  4598.             dc.w     $A82A
  4599.         EndM
  4600.     ELSE
  4601.         IMPORT_CFM_FUNCTION    SCNewGWorld
  4602.     ENDIF
  4603.  
  4604. ;
  4605. ; pascal ComponentResult SCSetCompressFlags(ComponentInstance ci, long flags)
  4606. ;
  4607.     IF ¬ GENERATINGCFM THEN
  4608.         Macro
  4609.         _SCSetCompressFlags
  4610.             dc.w     $2F3C
  4611.             dc.w     $0004
  4612.             dc.w     $0018
  4613.             moveq    #0,d0
  4614.             dc.w     $A82A
  4615.         EndM
  4616.     ELSE
  4617.         IMPORT_CFM_FUNCTION    SCSetCompressFlags
  4618.     ENDIF
  4619.  
  4620. ;
  4621. ; pascal ComponentResult SCGetCompressFlags(ComponentInstance ci, long *flags)
  4622. ;
  4623.     IF ¬ GENERATINGCFM THEN
  4624.         Macro
  4625.         _SCGetCompressFlags
  4626.             dc.w     $2F3C
  4627.             dc.w     $0004
  4628.             dc.w     $0019
  4629.             moveq    #0,d0
  4630.             dc.w     $A82A
  4631.         EndM
  4632.     ELSE
  4633.         IMPORT_CFM_FUNCTION    SCGetCompressFlags
  4634.     ENDIF
  4635.  
  4636. SCParams                 RECORD    0
  4637. flags                     ds.l   1        ; offset: $0 (0)
  4638. theCodecType             ds.l   1        ; offset: $4 (4)
  4639. theCodec                 ds.l   1        ; offset: $8 (8)
  4640. spatialQuality             ds.l   1        ; offset: $C (12)
  4641. temporalQuality             ds.l   1        ; offset: $10 (16)
  4642. depth                     ds.w   1        ; offset: $14 (20)
  4643. frameRate                 ds.l   1        ; offset: $16 (22)
  4644. keyFrameRate             ds.l   1        ; offset: $1A (26)
  4645. reserved1                 ds.l   1        ; offset: $1E (30)
  4646. reserved2                 ds.l   1        ; offset: $22 (34)
  4647. sizeof                     EQU *            ; size:   $26 (38)
  4648.                         ENDR
  4649.  
  4650. ; typedef struct SCParams     SCParams
  4651.  
  4652. scGetCompression                EQU        1
  4653. scShowMotionSettings            EQU        1 << 0
  4654. scSettingsChangedItem            EQU        -1
  4655.  
  4656. scCompressFlagIgnoreIdenticalFrames EQU        1
  4657.  
  4658. ;
  4659. ; pascal ComponentResult SCGetCompressionExtended(ComponentInstance ci, SCParams *params, Point where, SCModalFilterUPP filterProc, SCModalHookUPP hookProc, long refcon, StringPtr customName)
  4660. ;
  4661.     IF ¬ GENERATINGCFM THEN
  4662.         Macro
  4663.         _SCGetCompressionExtended
  4664.             dc.w     $2F3C
  4665.             dc.w     $0018
  4666.             dc.w     $0001
  4667.             moveq    #0,d0
  4668.             dc.w     $A82A
  4669.         EndM
  4670.     ELSE
  4671.         IMPORT_CFM_FUNCTION    SCGetCompressionExtended
  4672.     ENDIF
  4673.  
  4674. kSCPositionRectSelect            EQU        $2
  4675. kSCPositionDialogSelect            EQU        $3
  4676. kSCSetTestImagePictHandleSelect    EQU        $4
  4677. kSCSetTestImagePictFileSelect    EQU        $5
  4678. kSCSetTestImagePixMapSelect        EQU        $6
  4679. kSCGetBestDeviceRectSelect        EQU        $7
  4680. kSCRequestImageSettingsSelect    EQU        $A
  4681. kSCCompressImageSelect            EQU        $B
  4682. kSCCompressPictureSelect        EQU        $C
  4683. kSCCompressPictureFileSelect    EQU        $D
  4684. kSCRequestSequenceSettingsSelect EQU        $E
  4685. kSCCompressSequenceBeginSelect    EQU        $F
  4686. kSCCompressSequenceFrameSelect    EQU        $10
  4687. kSCCompressSequenceEndSelect    EQU        $11
  4688. kSCDefaultPictHandleSettingsSelect EQU        $12
  4689. kSCDefaultPictFileSettingsSelect EQU        $13
  4690. kSCDefaultPixMapSettingsSelect    EQU        $14
  4691. kSCGetInfoSelect                EQU        $15
  4692. kSCSetInfoSelect                EQU        $16
  4693. kSCNewGWorldSelect                EQU        $17
  4694. kSCSetCompressFlagsSelect        EQU        $18
  4695. kSCGetCompressFlagsSelect        EQU        $19
  4696. kSCGetCompressionExtendedSelect    EQU        $1
  4697.  
  4698. ; typedef ComponentInstance  MovieImportComponent, MovieExportComponent
  4699.  
  4700. MovieImportType                    EQU        'eat '
  4701. MovieExportType                    EQU        'spit'
  4702.  
  4703. canMovieImportHandles            EQU        1 << 0
  4704. canMovieImportFiles                EQU        1 << 1
  4705. hasMovieImportUserInterface        EQU        1 << 2
  4706. canMovieExportHandles            EQU        1 << 3
  4707. canMovieExportFiles                EQU        1 << 4
  4708. hasMovieExportUserInterface        EQU        1 << 5
  4709. dontAutoFileMovieImport            EQU        1 << 6
  4710. canMovieExportAuxDataHandle        EQU        1 << 7
  4711. canMovieImportValidateHandles    EQU        1 << 8
  4712. canMovieImportValidateFile        EQU        1 << 9
  4713. dontRegisterWithEasyOpen        EQU        1 << 10
  4714. canMovieImportInPlace            EQU        1 << 11
  4715. movieImportSubTypeIsFileExtension EQU        1 << 12
  4716.  
  4717. kMovieImportExportOpenSelect    EQU        kComponentOpenSelect
  4718. kMovieImportExportCloseSelect    EQU        kComponentCloseSelect
  4719. kMovieImportExportCanDoSelect    EQU        kComponentCanDoSelect
  4720. kMovieImportExportVersionSelect    EQU        kComponentVersionSelect
  4721. kMovieImportHandleSelect        EQU        1
  4722. kMovieImportFileSelect            EQU        2
  4723. kMovieImportSetSampleDurationSelect EQU        3
  4724. kMovieImportSetSampleDescriptionSelect EQU        4
  4725. kMovieImportSetMediaFileSelect    EQU        5
  4726. kMovieImportSetDimensionsSelect    EQU        6
  4727. kMovieImportSetChunkSizeSelect    EQU        7
  4728. kMovieImportSetProgressProcSelect EQU        8
  4729. kMovieImportSetAuxiliaryDataSelect EQU        9
  4730. kMovieImportSetFromScrapSelect    EQU        10
  4731. kMovieImportDoUserDialogSelect    EQU        11
  4732. kMovieImportSetDurationSelect    EQU        12
  4733. kMovieImportGetAuxiliaryDataTypeSelect EQU        13
  4734. kMovieImportValidateSelect        EQU        14
  4735. kMovieImportGetFileTypeSelect    EQU        15
  4736. kMovieExportToHandleSelect        EQU        128
  4737. kMovieExportToFileSelect        EQU        129
  4738. kMovieExportDoUserDialogSelectOBSOLETE EQU        130
  4739. kMovieExportGetAuxiliaryDataSelect EQU        131
  4740. kMovieExportSetProgressProcSelect EQU        132
  4741. kMovieExportSetSampleDescriptionSelect EQU        133
  4742. kMovieExportDoUserDialogSelect    EQU        134
  4743. kMovieExportGetCreatorTypeSelect EQU        135
  4744.  
  4745. movieImportCreateTrack            EQU        1
  4746. movieImportInParallel            EQU        2
  4747. movieImportMustUseTrack            EQU        4
  4748.  
  4749. movieImportResultUsedMultipleTracks EQU        8
  4750.  
  4751. ;
  4752. ; pascal ComponentResult MovieImportHandle(MovieImportComponent ci, Handle dataH, Movie theMovie, Track targetTrack, Track *usedTrack, TimeValue atTime, TimeValue *addedDuration, long inFlags, long *outFlags)
  4753. ;
  4754.     IF ¬ GENERATINGCFM THEN
  4755.         Macro
  4756.         _MovieImportHandle
  4757.             dc.w     $2F3C
  4758.             dc.w     $0020
  4759.             dc.w     $0001
  4760.             moveq    #0,d0
  4761.             dc.w     $A82A
  4762.         EndM
  4763.     ELSE
  4764.         IMPORT_CFM_FUNCTION    MovieImportHandle
  4765.     ENDIF
  4766.  
  4767. ;
  4768. ; pascal ComponentResult MovieImportFile(MovieImportComponent ci, const FSSpec *theFile, Movie theMovie, Track targetTrack, Track *usedTrack, TimeValue atTime, TimeValue *addedDuration, long inFlags, long *outFlags)
  4769. ;
  4770.     IF ¬ GENERATINGCFM THEN
  4771.         Macro
  4772.         _MovieImportFile
  4773.             dc.w     $2F3C
  4774.             dc.w     $0020
  4775.             dc.w     $0002
  4776.             moveq    #0,d0
  4777.             dc.w     $A82A
  4778.         EndM
  4779.     ELSE
  4780.         IMPORT_CFM_FUNCTION    MovieImportFile
  4781.     ENDIF
  4782.  
  4783. ;
  4784. ; pascal ComponentResult MovieImportSetSampleDuration(MovieImportComponent ci, TimeValue duration, TimeScale scale)
  4785. ;
  4786.     IF ¬ GENERATINGCFM THEN
  4787.         Macro
  4788.         _MovieImportSetSampleDuration
  4789.             dc.w     $2F3C
  4790.             dc.w     $0008
  4791.             dc.w     $0003
  4792.             moveq    #0,d0
  4793.             dc.w     $A82A
  4794.         EndM
  4795.     ELSE
  4796.         IMPORT_CFM_FUNCTION    MovieImportSetSampleDuration
  4797.     ENDIF
  4798.  
  4799. ;
  4800. ; pascal ComponentResult MovieImportSetSampleDescription(MovieImportComponent ci, SampleDescriptionHandle desc, OSType mediaType)
  4801. ;
  4802.     IF ¬ GENERATINGCFM THEN
  4803.         Macro
  4804.         _MovieImportSetSampleDescription
  4805.             dc.w     $2F3C
  4806.             dc.w     $0008
  4807.             dc.w     $0004
  4808.             moveq    #0,d0
  4809.             dc.w     $A82A
  4810.         EndM
  4811.     ELSE
  4812.         IMPORT_CFM_FUNCTION    MovieImportSetSampleDescription
  4813.     ENDIF
  4814.  
  4815. ;
  4816. ; pascal ComponentResult MovieImportSetMediaFile(MovieImportComponent ci, AliasHandle alias)
  4817. ;
  4818.     IF ¬ GENERATINGCFM THEN
  4819.         Macro
  4820.         _MovieImportSetMediaFile
  4821.             dc.w     $2F3C
  4822.             dc.w     $0004
  4823.             dc.w     $0005
  4824.             moveq    #0,d0
  4825.             dc.w     $A82A
  4826.         EndM
  4827.     ELSE
  4828.         IMPORT_CFM_FUNCTION    MovieImportSetMediaFile
  4829.     ENDIF
  4830.  
  4831. ;
  4832. ; pascal ComponentResult MovieImportSetDimensions(MovieImportComponent ci, Fixed width, Fixed height)
  4833. ;
  4834.     IF ¬ GENERATINGCFM THEN
  4835.         Macro
  4836.         _MovieImportSetDimensions
  4837.             dc.w     $2F3C
  4838.             dc.w     $0008
  4839.             dc.w     $0006
  4840.             moveq    #0,d0
  4841.             dc.w     $A82A
  4842.         EndM
  4843.     ELSE
  4844.         IMPORT_CFM_FUNCTION    MovieImportSetDimensions
  4845.     ENDIF
  4846.  
  4847. ;
  4848. ; pascal ComponentResult MovieImportSetChunkSize(MovieImportComponent ci, long chunkSize)
  4849. ;
  4850.     IF ¬ GENERATINGCFM THEN
  4851.         Macro
  4852.         _MovieImportSetChunkSize
  4853.             dc.w     $2F3C
  4854.             dc.w     $0004
  4855.             dc.w     $0007
  4856.             moveq    #0,d0
  4857.             dc.w     $A82A
  4858.         EndM
  4859.     ELSE
  4860.         IMPORT_CFM_FUNCTION    MovieImportSetChunkSize
  4861.     ENDIF
  4862.  
  4863. ;
  4864. ; pascal ComponentResult MovieImportSetProgressProc(MovieImportComponent ci, MovieProgressUPP proc, long refcon)
  4865. ;
  4866.     IF ¬ GENERATINGCFM THEN
  4867.         Macro
  4868.         _MovieImportSetProgressProc
  4869.             dc.w     $2F3C
  4870.             dc.w     $0008
  4871.             dc.w     $0008
  4872.             moveq    #0,d0
  4873.             dc.w     $A82A
  4874.         EndM
  4875.     ELSE
  4876.         IMPORT_CFM_FUNCTION    MovieImportSetProgressProc
  4877.     ENDIF
  4878.  
  4879. ;
  4880. ; pascal ComponentResult MovieImportSetAuxiliaryData(MovieImportComponent ci, Handle data, OSType handleType)
  4881. ;
  4882.     IF ¬ GENERATINGCFM THEN
  4883.         Macro
  4884.         _MovieImportSetAuxiliaryData
  4885.             dc.w     $2F3C
  4886.             dc.w     $0008
  4887.             dc.w     $0009
  4888.             moveq    #0,d0
  4889.             dc.w     $A82A
  4890.         EndM
  4891.     ELSE
  4892.         IMPORT_CFM_FUNCTION    MovieImportSetAuxiliaryData
  4893.     ENDIF
  4894.  
  4895. ;
  4896. ; pascal ComponentResult MovieImportSetFromScrap(MovieImportComponent ci, Boolean fromScrap)
  4897. ;
  4898.     IF ¬ GENERATINGCFM THEN
  4899.         Macro
  4900.         _MovieImportSetFromScrap
  4901.             dc.w     $2F3C
  4902.             dc.w     $0002
  4903.             dc.w     $000A
  4904.             moveq    #0,d0
  4905.             dc.w     $A82A
  4906.         EndM
  4907.     ELSE
  4908.         IMPORT_CFM_FUNCTION    MovieImportSetFromScrap
  4909.     ENDIF
  4910.  
  4911. ;
  4912. ; pascal ComponentResult MovieImportDoUserDialog(MovieImportComponent ci, const FSSpec *theFile, Handle theData, Boolean *canceled)
  4913. ;
  4914.     IF ¬ GENERATINGCFM THEN
  4915.         Macro
  4916.         _MovieImportDoUserDialog
  4917.             dc.w     $2F3C
  4918.             dc.w     $000C
  4919.             dc.w     $000B
  4920.             moveq    #0,d0
  4921.             dc.w     $A82A
  4922.         EndM
  4923.     ELSE
  4924.         IMPORT_CFM_FUNCTION    MovieImportDoUserDialog
  4925.     ENDIF
  4926.  
  4927. ;
  4928. ; pascal ComponentResult MovieImportSetDuration(MovieImportComponent ci, TimeValue duration)
  4929. ;
  4930.     IF ¬ GENERATINGCFM THEN
  4931.         Macro
  4932.         _MovieImportSetDuration
  4933.             dc.w     $2F3C
  4934.             dc.w     $0004
  4935.             dc.w     $000C
  4936.             moveq    #0,d0
  4937.             dc.w     $A82A
  4938.         EndM
  4939.     ELSE
  4940.         IMPORT_CFM_FUNCTION    MovieImportSetDuration
  4941.     ENDIF
  4942.  
  4943. ;
  4944. ; pascal ComponentResult MovieImportGetAuxiliaryDataType(MovieImportComponent ci, OSType *auxType)
  4945. ;
  4946.     IF ¬ GENERATINGCFM THEN
  4947.         Macro
  4948.         _MovieImportGetAuxiliaryDataType
  4949.             dc.w     $2F3C
  4950.             dc.w     $0004
  4951.             dc.w     $000D
  4952.             moveq    #0,d0
  4953.             dc.w     $A82A
  4954.         EndM
  4955.     ELSE
  4956.         IMPORT_CFM_FUNCTION    MovieImportGetAuxiliaryDataType
  4957.     ENDIF
  4958.  
  4959. ;
  4960. ; pascal ComponentResult MovieImportValidate(MovieImportComponent ci, const FSSpec *theFile, Handle theData, Boolean *valid)
  4961. ;
  4962.     IF ¬ GENERATINGCFM THEN
  4963.         Macro
  4964.         _MovieImportValidate
  4965.             dc.w     $2F3C
  4966.             dc.w     $000C
  4967.             dc.w     $000E
  4968.             moveq    #0,d0
  4969.             dc.w     $A82A
  4970.         EndM
  4971.     ELSE
  4972.         IMPORT_CFM_FUNCTION    MovieImportValidate
  4973.     ENDIF
  4974.  
  4975. ;
  4976. ; pascal ComponentResult MovieImportGetFileType(MovieImportComponent ci, OSType *fileType)
  4977. ;
  4978.     IF ¬ GENERATINGCFM THEN
  4979.         Macro
  4980.         _MovieImportGetFileType
  4981.             dc.w     $2F3C
  4982.             dc.w     $0004
  4983.             dc.w     $000F
  4984.             moveq    #0,d0
  4985.             dc.w     $A82A
  4986.         EndM
  4987.     ELSE
  4988.         IMPORT_CFM_FUNCTION    MovieImportGetFileType
  4989.     ENDIF
  4990.  
  4991. ;
  4992. ; pascal ComponentResult MovieExportToHandle(MovieExportComponent ci, Handle dataH, Movie theMovie, Track onlyThisTrack, TimeValue startTime, TimeValue duration)
  4993. ;
  4994.     IF ¬ GENERATINGCFM THEN
  4995.         Macro
  4996.         _MovieExportToHandle
  4997.             dc.w     $2F3C
  4998.             dc.w     $0014
  4999.             dc.w     $0080
  5000.             moveq    #0,d0
  5001.             dc.w     $A82A
  5002.         EndM
  5003.     ELSE
  5004.         IMPORT_CFM_FUNCTION    MovieExportToHandle
  5005.     ENDIF
  5006.  
  5007. ;
  5008. ; pascal ComponentResult MovieExportToFile(MovieExportComponent ci, const FSSpec *theFile, Movie theMovie, Track onlyThisTrack, TimeValue startTime, TimeValue duration)
  5009. ;
  5010.     IF ¬ GENERATINGCFM THEN
  5011.         Macro
  5012.         _MovieExportToFile
  5013.             dc.w     $2F3C
  5014.             dc.w     $0014
  5015.             dc.w     $0081
  5016.             moveq    #0,d0
  5017.             dc.w     $A82A
  5018.         EndM
  5019.     ELSE
  5020.         IMPORT_CFM_FUNCTION    MovieExportToFile
  5021.     ENDIF
  5022.  
  5023. ;
  5024. ; pascal ComponentResult MovieExportGetAuxiliaryData(MovieExportComponent ci, Handle dataH, OSType *handleType)
  5025. ;
  5026.     IF ¬ GENERATINGCFM THEN
  5027.         Macro
  5028.         _MovieExportGetAuxiliaryData
  5029.             dc.w     $2F3C
  5030.             dc.w     $0008
  5031.             dc.w     $0083
  5032.             moveq    #0,d0
  5033.             dc.w     $A82A
  5034.         EndM
  5035.     ELSE
  5036.         IMPORT_CFM_FUNCTION    MovieExportGetAuxiliaryData
  5037.     ENDIF
  5038.  
  5039. ;
  5040. ; pascal ComponentResult MovieExportSetProgressProc(MovieExportComponent ci, MovieProgressUPP proc, long refcon)
  5041. ;
  5042.     IF ¬ GENERATINGCFM THEN
  5043.         Macro
  5044.         _MovieExportSetProgressProc
  5045.             dc.w     $2F3C
  5046.             dc.w     $0008
  5047.             dc.w     $0084
  5048.             moveq    #0,d0
  5049.             dc.w     $A82A
  5050.         EndM
  5051.     ELSE
  5052.         IMPORT_CFM_FUNCTION    MovieExportSetProgressProc
  5053.     ENDIF
  5054.  
  5055. ;
  5056. ; pascal ComponentResult MovieExportSetSampleDescription(MovieExportComponent ci, SampleDescriptionHandle desc, OSType mediaType)
  5057. ;
  5058.     IF ¬ GENERATINGCFM THEN
  5059.         Macro
  5060.         _MovieExportSetSampleDescription
  5061.             dc.w     $2F3C
  5062.             dc.w     $0008
  5063.             dc.w     $0085
  5064.             moveq    #0,d0
  5065.             dc.w     $A82A
  5066.         EndM
  5067.     ELSE
  5068.         IMPORT_CFM_FUNCTION    MovieExportSetSampleDescription
  5069.     ENDIF
  5070.  
  5071. ;
  5072. ; pascal ComponentResult MovieExportDoUserDialog(MovieExportComponent ci, Movie theMovie, Track onlyThisTrack, TimeValue startTime, TimeValue duration, Boolean *canceled)
  5073. ;
  5074.     IF ¬ GENERATINGCFM THEN
  5075.         Macro
  5076.         _MovieExportDoUserDialog
  5077.             dc.w     $2F3C
  5078.             dc.w     $0014
  5079.             dc.w     $0086
  5080.             moveq    #0,d0
  5081.             dc.w     $A82A
  5082.         EndM
  5083.     ELSE
  5084.         IMPORT_CFM_FUNCTION    MovieExportDoUserDialog
  5085.     ENDIF
  5086.  
  5087. ;
  5088. ; pascal ComponentResult MovieExportGetCreatorType(MovieExportComponent ci, OSType *creator)
  5089. ;
  5090.     IF ¬ GENERATINGCFM THEN
  5091.         Macro
  5092.         _MovieExportGetCreatorType
  5093.             dc.w     $2F3C
  5094.             dc.w     $0004
  5095.             dc.w     $0087
  5096.             moveq    #0,d0
  5097.             dc.w     $A82A
  5098.         EndM
  5099.     ELSE
  5100.         IMPORT_CFM_FUNCTION    MovieExportGetCreatorType
  5101.     ENDIF
  5102.  
  5103.      IF ¬ GENERATINGPOWERPC THEN 
  5104. ; Text Export Display Info data structure
  5105. TextDisplayData         RECORD    0
  5106. displayFlags             ds.l   1        ; offset: $0 (0)
  5107. textJustification         ds.l   1        ; offset: $4 (4)
  5108. bgColor                     ds     RGBColor ; offset: $8 (8)
  5109. textBox                     ds     Rect    ; offset: $E (14)
  5110. beginHilite                 ds.w   1        ; offset: $16 (22)
  5111. endHilite                 ds.w   1        ; offset: $18 (24)
  5112. hiliteColor                 ds     RGBColor ; offset: $1A (26)
  5113. doHiliteColor             ds.b   1        ; offset: $20 (32)
  5114. filler                     ds.b   1        ; offset: $21 (33)
  5115. scrollDelayDur             ds.l   1        ; offset: $22 (34)
  5116. dropShadowOffset         ds     Point    ; offset: $26 (38)
  5117. dropShadowTransparency     ds.w   1        ; offset: $2A (42)
  5118. sizeof                     EQU *            ; size:   $2C (44)
  5119.                         ENDR
  5120.  
  5121. ; typedef struct TextDisplayData  TextDisplayData
  5122.     ENDIF
  5123. ; typedef ComponentInstance  TextExportComponent
  5124. ;
  5125. ; pascal ComponentResult TextExportGetDisplayData(TextExportComponent ci, TextDisplayData *textDisplay)
  5126. ;
  5127.     IF ¬ GENERATINGCFM THEN
  5128.         Macro
  5129.         _TextExportGetDisplayData
  5130.             dc.w     $2F3C
  5131.             dc.w     $0004
  5132.             dc.w     $0100
  5133.             moveq    #0,d0
  5134.             dc.w     $A82A
  5135.         EndM
  5136.     ELSE
  5137.         IMPORT_CFM_FUNCTION    TextExportGetDisplayData
  5138.     ENDIF
  5139.  
  5140. ;**************
  5141. ;
  5142. ;    File Preview Components
  5143. ;
  5144. ;**************
  5145. ; typedef ComponentInstance  pnotComponent
  5146.  
  5147. pnotComponentWantsEvents        EQU        1
  5148. pnotComponentNeedsNoCache        EQU        2
  5149.  
  5150. kPreviewOpenSelector            EQU        0
  5151. kPreviewCloseSelector            EQU        -1
  5152. kPreviewCanDoSelector            EQU        -2
  5153. kPreviewVersionSelector            EQU        -3
  5154. kPreviewShowDataSelector        EQU        1
  5155. kPreviewMakePreviewSelector        EQU        2
  5156. kPreviewMakePreviewReferenceSelector EQU        3
  5157. kPreviewEventSelector            EQU        4
  5158.  
  5159. ShowFilePreviewComponentType    EQU        'pnot'
  5160. CreateFilePreviewComponentType    EQU        'pmak'
  5161.  
  5162. ;
  5163. ; pascal ComponentResult PreviewShowData(pnotComponent p, OSType dataType, Handle data, const Rect *inHere)
  5164. ;
  5165.     IF ¬ GENERATINGCFM THEN
  5166.         Macro
  5167.         _PreviewShowData
  5168.             dc.w     $2F3C
  5169.             dc.w     $000C
  5170.             dc.w     $0001
  5171.             moveq    #0,d0
  5172.             dc.w     $A82A
  5173.         EndM
  5174.     ELSE
  5175.         IMPORT_CFM_FUNCTION    PreviewShowData
  5176.     ENDIF
  5177.  
  5178. ;
  5179. ; pascal ComponentResult PreviewMakePreview(pnotComponent p, OSType *previewType, Handle *previewResult, const FSSpec *sourceFile, ICMProgressProcRecordPtr progress)
  5180. ;
  5181.     IF ¬ GENERATINGCFM THEN
  5182.         Macro
  5183.         _PreviewMakePreview
  5184.             dc.w     $2F3C
  5185.             dc.w     $0010
  5186.             dc.w     $0002
  5187.             moveq    #0,d0
  5188.             dc.w     $A82A
  5189.         EndM
  5190.     ELSE
  5191.         IMPORT_CFM_FUNCTION    PreviewMakePreview
  5192.     ENDIF
  5193.  
  5194. ;
  5195. ; pascal ComponentResult PreviewMakePreviewReference(pnotComponent p, OSType *previewType, short *resID, const FSSpec *sourceFile)
  5196. ;
  5197.     IF ¬ GENERATINGCFM THEN
  5198.         Macro
  5199.         _PreviewMakePreviewReference
  5200.             dc.w     $2F3C
  5201.             dc.w     $000C
  5202.             dc.w     $0003
  5203.             moveq    #0,d0
  5204.             dc.w     $A82A
  5205.         EndM
  5206.     ELSE
  5207.         IMPORT_CFM_FUNCTION    PreviewMakePreviewReference
  5208.     ENDIF
  5209.  
  5210. ;
  5211. ; pascal ComponentResult PreviewEvent(pnotComponent p, EventRecord *e, Boolean *handledEvent)
  5212. ;
  5213.     IF ¬ GENERATINGCFM THEN
  5214.         Macro
  5215.         _PreviewEvent
  5216.             dc.w     $2F3C
  5217.             dc.w     $0008
  5218.             dc.w     $0004
  5219.             moveq    #0,d0
  5220.             dc.w     $A82A
  5221.         EndM
  5222.     ELSE
  5223.         IMPORT_CFM_FUNCTION    PreviewEvent
  5224.     ENDIF
  5225.  
  5226. kDataHCanRead                    EQU        1 << 0
  5227. kDataHSpecialRead                EQU        1 << 1
  5228. kDataHSpecialReadFile            EQU        1 << 2
  5229. kDataHCanWrite                    EQU        1 << 3
  5230. kDataHSpecialWrite                EQU        1 << 4
  5231. kDataHSpecialWriteFile            EQU        1 << 5
  5232. kDataHCanStreamingWrite            EQU        1 << 6
  5233. kDataHMustCheckDataRef            EQU        1 << 7
  5234.  
  5235. DataHVolumeListRecord     RECORD    0
  5236. vRefNum                     ds.w   1        ; offset: $0 (0)
  5237. flags                     ds.l   1        ; offset: $2 (2)
  5238. sizeof                     EQU *            ; size:   $6 (6)
  5239.                         ENDR
  5240.  
  5241. ; typedef struct DataHVolumeListRecord  DataHVolumeListRecord
  5242. ; typedef DataHVolumeListRecord  *DataHVolumeListPtr
  5243. ; typedef DataHVolumeListPtr  *DataHVolumeList
  5244.  
  5245. kDataHExtendedSchedule            EQU        'xtnd'
  5246.  
  5247. DataHScheduleRecord     RECORD    0
  5248. timeNeededBy             ds     TimeRecord ; offset: $0 (0)
  5249. extendedID                 ds.l   1        ; offset: $10 (16)        ; always is kDataHExtendedSchedule
  5250. extendedVers             ds.l   1        ; offset: $14 (20)        ; always set to 0
  5251. priority                 ds.l   1        ; offset: $18 (24)        ; 100.0 or more means must have. lower numbers…
  5252. sizeof                     EQU *            ; size:   $1C (28)
  5253.                         ENDR
  5254.  
  5255. ; typedef struct DataHScheduleRecord  DataHScheduleRecord
  5256. ; typedef DataHScheduleRecord  *DataHSchedulePtr
  5257. ;
  5258. ; pascal ComponentResult DataHGetData(DataHandler dh, Handle h, long hOffset, long offset, long size)
  5259. ;
  5260.     IF ¬ GENERATINGCFM THEN
  5261.         Macro
  5262.         _DataHGetData
  5263.             dc.w     $2F3C
  5264.             dc.w     $0010
  5265.             dc.w     $0002
  5266.             moveq    #0,d0
  5267.             dc.w     $A82A
  5268.         EndM
  5269.     ELSE
  5270.         IMPORT_CFM_FUNCTION    DataHGetData
  5271.     ENDIF
  5272.  
  5273. ;
  5274. ; pascal ComponentResult DataHPutData(DataHandler dh, Handle h, long hOffset, long *offset, long size)
  5275. ;
  5276.     IF ¬ GENERATINGCFM THEN
  5277.         Macro
  5278.         _DataHPutData
  5279.             dc.w     $2F3C
  5280.             dc.w     $0010
  5281.             dc.w     $0003
  5282.             moveq    #0,d0
  5283.             dc.w     $A82A
  5284.         EndM
  5285.     ELSE
  5286.         IMPORT_CFM_FUNCTION    DataHPutData
  5287.     ENDIF
  5288.  
  5289. ;
  5290. ; pascal ComponentResult DataHFlushData(DataHandler dh)
  5291. ;
  5292.     IF ¬ GENERATINGCFM THEN
  5293.         Macro
  5294.         _DataHFlushData
  5295.             dc.w     $2F3C
  5296.             dc.w     $0000
  5297.             dc.w     $0004
  5298.             moveq    #0,d0
  5299.             dc.w     $A82A
  5300.         EndM
  5301.     ELSE
  5302.         IMPORT_CFM_FUNCTION    DataHFlushData
  5303.     ENDIF
  5304.  
  5305. ;
  5306. ; pascal ComponentResult DataHOpenForWrite(DataHandler dh)
  5307. ;
  5308.     IF ¬ GENERATINGCFM THEN
  5309.         Macro
  5310.         _DataHOpenForWrite
  5311.             dc.w     $2F3C
  5312.             dc.w     $0000
  5313.             dc.w     $0005
  5314.             moveq    #0,d0
  5315.             dc.w     $A82A
  5316.         EndM
  5317.     ELSE
  5318.         IMPORT_CFM_FUNCTION    DataHOpenForWrite
  5319.     ENDIF
  5320.  
  5321. ;
  5322. ; pascal ComponentResult DataHCloseForWrite(DataHandler dh)
  5323. ;
  5324.     IF ¬ GENERATINGCFM THEN
  5325.         Macro
  5326.         _DataHCloseForWrite
  5327.             dc.w     $2F3C
  5328.             dc.w     $0000
  5329.             dc.w     $0006
  5330.             moveq    #0,d0
  5331.             dc.w     $A82A
  5332.         EndM
  5333.     ELSE
  5334.         IMPORT_CFM_FUNCTION    DataHCloseForWrite
  5335.     ENDIF
  5336.  
  5337. ;
  5338. ; pascal ComponentResult DataHOpenForRead(DataHandler dh)
  5339. ;
  5340.     IF ¬ GENERATINGCFM THEN
  5341.         Macro
  5342.         _DataHOpenForRead
  5343.             dc.w     $2F3C
  5344.             dc.w     $0000
  5345.             dc.w     $0008
  5346.             moveq    #0,d0
  5347.             dc.w     $A82A
  5348.         EndM
  5349.     ELSE
  5350.         IMPORT_CFM_FUNCTION    DataHOpenForRead
  5351.     ENDIF
  5352.  
  5353. ;
  5354. ; pascal ComponentResult DataHCloseForRead(DataHandler dh)
  5355. ;
  5356.     IF ¬ GENERATINGCFM THEN
  5357.         Macro
  5358.         _DataHCloseForRead
  5359.             dc.w     $2F3C
  5360.             dc.w     $0000
  5361.             dc.w     $0009
  5362.             moveq    #0,d0
  5363.             dc.w     $A82A
  5364.         EndM
  5365.     ELSE
  5366.         IMPORT_CFM_FUNCTION    DataHCloseForRead
  5367.     ENDIF
  5368.  
  5369. ;
  5370. ; pascal ComponentResult DataHSetDataRef(DataHandler dh, Handle dataRef)
  5371. ;
  5372.     IF ¬ GENERATINGCFM THEN
  5373.         Macro
  5374.         _DataHSetDataRef
  5375.             dc.w     $2F3C
  5376.             dc.w     $0004
  5377.             dc.w     $000A
  5378.             moveq    #0,d0
  5379.             dc.w     $A82A
  5380.         EndM
  5381.     ELSE
  5382.         IMPORT_CFM_FUNCTION    DataHSetDataRef
  5383.     ENDIF
  5384.  
  5385. ;
  5386. ; pascal ComponentResult DataHGetDataRef(DataHandler dh, Handle *dataRef)
  5387. ;
  5388.     IF ¬ GENERATINGCFM THEN
  5389.         Macro
  5390.         _DataHGetDataRef
  5391.             dc.w     $2F3C
  5392.             dc.w     $0004
  5393.             dc.w     $000B
  5394.             moveq    #0,d0
  5395.             dc.w     $A82A
  5396.         EndM
  5397.     ELSE
  5398.         IMPORT_CFM_FUNCTION    DataHGetDataRef
  5399.     ENDIF
  5400.  
  5401. ;
  5402. ; pascal ComponentResult DataHCompareDataRef(DataHandler dh, Handle dataRef, Boolean *equal)
  5403. ;
  5404.     IF ¬ GENERATINGCFM THEN
  5405.         Macro
  5406.         _DataHCompareDataRef
  5407.             dc.w     $2F3C
  5408.             dc.w     $0008
  5409.             dc.w     $000C
  5410.             moveq    #0,d0
  5411.             dc.w     $A82A
  5412.         EndM
  5413.     ELSE
  5414.         IMPORT_CFM_FUNCTION    DataHCompareDataRef
  5415.     ENDIF
  5416.  
  5417. ;
  5418. ; pascal ComponentResult DataHTask(DataHandler dh)
  5419. ;
  5420.     IF ¬ GENERATINGCFM THEN
  5421.         Macro
  5422.         _DataHTask
  5423.             dc.w     $2F3C
  5424.             dc.w     $0000
  5425.             dc.w     $000D
  5426.             moveq    #0,d0
  5427.             dc.w     $A82A
  5428.         EndM
  5429.     ELSE
  5430.         IMPORT_CFM_FUNCTION    DataHTask
  5431.     ENDIF
  5432.  
  5433. ;
  5434. ; pascal ComponentResult DataHScheduleData(DataHandler dh, Ptr PlaceToPutDataPtr, long FileOffset, long DataSize, long RefCon, DataHSchedulePtr scheduleRec, DataHCompletionUPP CompletionRtn)
  5435. ;
  5436.     IF ¬ GENERATINGCFM THEN
  5437.         Macro
  5438.         _DataHScheduleData
  5439.             dc.w     $2F3C
  5440.             dc.w     $0018
  5441.             dc.w     $000E
  5442.             moveq    #0,d0
  5443.             dc.w     $A82A
  5444.         EndM
  5445.     ELSE
  5446.         IMPORT_CFM_FUNCTION    DataHScheduleData
  5447.     ENDIF
  5448.  
  5449. ;
  5450. ; pascal ComponentResult DataHFinishData(DataHandler dh, Ptr PlaceToPutDataPtr, Boolean Cancel)
  5451. ;
  5452.     IF ¬ GENERATINGCFM THEN
  5453.         Macro
  5454.         _DataHFinishData
  5455.             dc.w     $2F3C
  5456.             dc.w     $0006
  5457.             dc.w     $000F
  5458.             moveq    #0,d0
  5459.             dc.w     $A82A
  5460.         EndM
  5461.     ELSE
  5462.         IMPORT_CFM_FUNCTION    DataHFinishData
  5463.     ENDIF
  5464.  
  5465. ;
  5466. ; pascal ComponentResult DataHFlushCache(DataHandler dh)
  5467. ;
  5468.     IF ¬ GENERATINGCFM THEN
  5469.         Macro
  5470.         _DataHFlushCache
  5471.             dc.w     $2F3C
  5472.             dc.w     $0000
  5473.             dc.w     $0010
  5474.             moveq    #0,d0
  5475.             dc.w     $A82A
  5476.         EndM
  5477.     ELSE
  5478.         IMPORT_CFM_FUNCTION    DataHFlushCache
  5479.     ENDIF
  5480.  
  5481. ;
  5482. ; pascal ComponentResult DataHResolveDataRef(DataHandler dh, Handle theDataRef, Boolean *wasChanged, Boolean userInterfaceAllowed)
  5483. ;
  5484.     IF ¬ GENERATINGCFM THEN
  5485.         Macro
  5486.         _DataHResolveDataRef
  5487.             dc.w     $2F3C
  5488.             dc.w     $000A
  5489.             dc.w     $0011
  5490.             moveq    #0,d0
  5491.             dc.w     $A82A
  5492.         EndM
  5493.     ELSE
  5494.         IMPORT_CFM_FUNCTION    DataHResolveDataRef
  5495.     ENDIF
  5496.  
  5497. ;
  5498. ; pascal ComponentResult DataHGetFileSize(DataHandler dh, long *fileSize)
  5499. ;
  5500.     IF ¬ GENERATINGCFM THEN
  5501.         Macro
  5502.         _DataHGetFileSize
  5503.             dc.w     $2F3C
  5504.             dc.w     $0004
  5505.             dc.w     $0012
  5506.             moveq    #0,d0
  5507.             dc.w     $A82A
  5508.         EndM
  5509.     ELSE
  5510.         IMPORT_CFM_FUNCTION    DataHGetFileSize
  5511.     ENDIF
  5512.  
  5513. ;
  5514. ; pascal ComponentResult DataHCanUseDataRef(DataHandler dh, Handle dataRef, long *useFlags)
  5515. ;
  5516.     IF ¬ GENERATINGCFM THEN
  5517.         Macro
  5518.         _DataHCanUseDataRef
  5519.             dc.w     $2F3C
  5520.             dc.w     $0008
  5521.             dc.w     $0013
  5522.             moveq    #0,d0
  5523.             dc.w     $A82A
  5524.         EndM
  5525.     ELSE
  5526.         IMPORT_CFM_FUNCTION    DataHCanUseDataRef
  5527.     ENDIF
  5528.  
  5529. ;
  5530. ; pascal ComponentResult DataHGetVolumeList(DataHandler dh, DataHVolumeList *volumeList)
  5531. ;
  5532.     IF ¬ GENERATINGCFM THEN
  5533.         Macro
  5534.         _DataHGetVolumeList
  5535.             dc.w     $2F3C
  5536.             dc.w     $0004
  5537.             dc.w     $0014
  5538.             moveq    #0,d0
  5539.             dc.w     $A82A
  5540.         EndM
  5541.     ELSE
  5542.         IMPORT_CFM_FUNCTION    DataHGetVolumeList
  5543.     ENDIF
  5544.  
  5545. ;
  5546. ; pascal ComponentResult DataHWrite(DataHandler dh, Ptr data, long offset, long size, DataHCompletionUPP completion, long refCon)
  5547. ;
  5548.     IF ¬ GENERATINGCFM THEN
  5549.         Macro
  5550.         _DataHWrite
  5551.             dc.w     $2F3C
  5552.             dc.w     $0014
  5553.             dc.w     $0015
  5554.             moveq    #0,d0
  5555.             dc.w     $A82A
  5556.         EndM
  5557.     ELSE
  5558.         IMPORT_CFM_FUNCTION    DataHWrite
  5559.     ENDIF
  5560.  
  5561. ;
  5562. ; pascal ComponentResult DataHPreextend(DataHandler dh, long maxToAdd, long *spaceAdded)
  5563. ;
  5564.     IF ¬ GENERATINGCFM THEN
  5565.         Macro
  5566.         _DataHPreextend
  5567.             dc.w     $2F3C
  5568.             dc.w     $0008
  5569.             dc.w     $0016
  5570.             moveq    #0,d0
  5571.             dc.w     $A82A
  5572.         EndM
  5573.     ELSE
  5574.         IMPORT_CFM_FUNCTION    DataHPreextend
  5575.     ENDIF
  5576.  
  5577. ;
  5578. ; pascal ComponentResult DataHSetFileSize(DataHandler dh, long fileSize)
  5579. ;
  5580.     IF ¬ GENERATINGCFM THEN
  5581.         Macro
  5582.         _DataHSetFileSize
  5583.             dc.w     $2F3C
  5584.             dc.w     $0004
  5585.             dc.w     $0017
  5586.             moveq    #0,d0
  5587.             dc.w     $A82A
  5588.         EndM
  5589.     ELSE
  5590.         IMPORT_CFM_FUNCTION    DataHSetFileSize
  5591.     ENDIF
  5592.  
  5593. ;
  5594. ; pascal ComponentResult DataHGetFreeSpace(DataHandler dh, unsigned long *freeSize)
  5595. ;
  5596.     IF ¬ GENERATINGCFM THEN
  5597.         Macro
  5598.         _DataHGetFreeSpace
  5599.             dc.w     $2F3C
  5600.             dc.w     $0004
  5601.             dc.w     $0018
  5602.             moveq    #0,d0
  5603.             dc.w     $A82A
  5604.         EndM
  5605.     ELSE
  5606.         IMPORT_CFM_FUNCTION    DataHGetFreeSpace
  5607.     ENDIF
  5608.  
  5609. ;
  5610. ; pascal ComponentResult DataHCreateFile(DataHandler dh, OSType creator, Boolean deleteExisting)
  5611. ;
  5612.     IF ¬ GENERATINGCFM THEN
  5613.         Macro
  5614.         _DataHCreateFile
  5615.             dc.w     $2F3C
  5616.             dc.w     $0006
  5617.             dc.w     $0019
  5618.             moveq    #0,d0
  5619.             dc.w     $A82A
  5620.         EndM
  5621.     ELSE
  5622.         IMPORT_CFM_FUNCTION    DataHCreateFile
  5623.     ENDIF
  5624.  
  5625. ;
  5626. ; pascal ComponentResult DataHGetPreferredBlockSize(DataHandler dh, long *blockSize)
  5627. ;
  5628.     IF ¬ GENERATINGCFM THEN
  5629.         Macro
  5630.         _DataHGetPreferredBlockSize
  5631.             dc.w     $2F3C
  5632.             dc.w     $0004
  5633.             dc.w     $001A
  5634.             moveq    #0,d0
  5635.             dc.w     $A82A
  5636.         EndM
  5637.     ELSE
  5638.         IMPORT_CFM_FUNCTION    DataHGetPreferredBlockSize
  5639.     ENDIF
  5640.  
  5641. ;
  5642. ; pascal ComponentResult DataHGetDeviceIndex(DataHandler dh, long *deviceIndex)
  5643. ;
  5644.     IF ¬ GENERATINGCFM THEN
  5645.         Macro
  5646.         _DataHGetDeviceIndex
  5647.             dc.w     $2F3C
  5648.             dc.w     $0004
  5649.             dc.w     $001B
  5650.             moveq    #0,d0
  5651.             dc.w     $A82A
  5652.         EndM
  5653.     ELSE
  5654.         IMPORT_CFM_FUNCTION    DataHGetDeviceIndex
  5655.     ENDIF
  5656.  
  5657. ;
  5658. ; pascal ComponentResult DataHIsStreamingDataHandler(DataHandler dh, Boolean *yes)
  5659. ;
  5660.     IF ¬ GENERATINGCFM THEN
  5661.         Macro
  5662.         _DataHIsStreamingDataHandler
  5663.             dc.w     $2F3C
  5664.             dc.w     $0004
  5665.             dc.w     $001C
  5666.             moveq    #0,d0
  5667.             dc.w     $A82A
  5668.         EndM
  5669.     ELSE
  5670.         IMPORT_CFM_FUNCTION    DataHIsStreamingDataHandler
  5671.     ENDIF
  5672.  
  5673. ;
  5674. ; pascal ComponentResult DataHGetDataInBuffer(DataHandler dh, long startOffset, long *size)
  5675. ;
  5676.     IF ¬ GENERATINGCFM THEN
  5677.         Macro
  5678.         _DataHGetDataInBuffer
  5679.             dc.w     $2F3C
  5680.             dc.w     $0008
  5681.             dc.w     $001D
  5682.             moveq    #0,d0
  5683.             dc.w     $A82A
  5684.         EndM
  5685.     ELSE
  5686.         IMPORT_CFM_FUNCTION    DataHGetDataInBuffer
  5687.     ENDIF
  5688.  
  5689. ;
  5690. ; pascal ComponentResult DataHGetScheduleAheadTime(DataHandler dh, long *millisecs)
  5691. ;
  5692.     IF ¬ GENERATINGCFM THEN
  5693.         Macro
  5694.         _DataHGetScheduleAheadTime
  5695.             dc.w     $2F3C
  5696.             dc.w     $0004
  5697.             dc.w     $001E
  5698.             moveq    #0,d0
  5699.             dc.w     $A82A
  5700.         EndM
  5701.     ELSE
  5702.         IMPORT_CFM_FUNCTION    DataHGetScheduleAheadTime
  5703.     ENDIF
  5704.  
  5705. ;
  5706. ; pascal ComponentResult DataHSetCacheSizeLimit(DataHandler dh, Size cacheSizeLimit)
  5707. ;
  5708.     IF ¬ GENERATINGCFM THEN
  5709.         Macro
  5710.         _DataHSetCacheSizeLimit
  5711.             dc.w     $2F3C
  5712.             dc.w     $0004
  5713.             dc.w     $001F
  5714.             moveq    #0,d0
  5715.             dc.w     $A82A
  5716.         EndM
  5717.     ELSE
  5718.         IMPORT_CFM_FUNCTION    DataHSetCacheSizeLimit
  5719.     ENDIF
  5720.  
  5721. ;
  5722. ; pascal ComponentResult DataHGetCacheSizeLimit(DataHandler dh, Size *cacheSizeLimit)
  5723. ;
  5724.     IF ¬ GENERATINGCFM THEN
  5725.         Macro
  5726.         _DataHGetCacheSizeLimit
  5727.             dc.w     $2F3C
  5728.             dc.w     $0004
  5729.             dc.w     $0020
  5730.             moveq    #0,d0
  5731.             dc.w     $A82A
  5732.         EndM
  5733.     ELSE
  5734.         IMPORT_CFM_FUNCTION    DataHGetCacheSizeLimit
  5735.     ENDIF
  5736.  
  5737. ;
  5738. ; pascal ComponentResult DataHPlaybackHints(DataHandler dh, long flags, unsigned long minFileOffset, unsigned long maxFileOffset, long bytesPerSecond)
  5739. ;
  5740.     IF ¬ GENERATINGCFM THEN
  5741.         Macro
  5742.         _DataHPlaybackHints
  5743.             dc.w     $2F3C
  5744.             dc.w     $0010
  5745.             dc.w     $0103
  5746.             moveq    #0,d0
  5747.             dc.w     $A82A
  5748.         EndM
  5749.     ELSE
  5750.         IMPORT_CFM_FUNCTION    DataHPlaybackHints
  5751.     ENDIF
  5752.  
  5753.  
  5754. kDataHGetDataSelect                EQU        $2
  5755. kDataHPutDataSelect                EQU        $3
  5756. kDataHFlushDataSelect            EQU        $4
  5757. kDataHOpenForWriteSelect        EQU        $5
  5758. kDataHCloseForWriteSelect        EQU        $6
  5759. kDataHOpenForReadSelect            EQU        $8
  5760. kDataHCloseForReadSelect        EQU        $9
  5761. kDataHSetDataRefSelect            EQU        $A
  5762. kDataHGetDataRefSelect            EQU        $B
  5763. kDataHCompareDataRefSelect        EQU        $C
  5764. kDataHTaskSelect                EQU        $D
  5765. kDataHScheduleDataSelect        EQU        $E
  5766. kDataHFinishDataSelect            EQU        $F
  5767. kDataHFlushCacheSelect            EQU        $10
  5768. kDataHResolveDataRefSelect        EQU        $11
  5769. kDataHGetFileSizeSelect            EQU        $12
  5770. kDataHCanUseDataRefSelect        EQU        $13
  5771. kDataHGetVolumeListSelect        EQU        $14
  5772. kDataHWriteSelect                EQU        $15
  5773. kDataHPreextendSelect            EQU        $16
  5774. kDataHSetFileSizeSelect            EQU        $17
  5775. kDataHGetFreeSpaceSelect        EQU        $18
  5776. kDataHCreateFileSelect            EQU        $19
  5777. kDataHGetPreferredBlockSizeSelect EQU        $1A
  5778. kDataHGetDeviceIndexSelect        EQU        $1B
  5779. kDataHIsStreamingDataHandlerSelect EQU        $1C
  5780. kDataHGetDataInBufferSelect        EQU        $1D
  5781. kDataHGetScheduleAheadTimeSelect EQU        $1E
  5782. kDataHSetCacheSizeLimitSelect    EQU        $1F
  5783. kDataHGetCacheSizeLimitSelect    EQU        $20
  5784. kDataHPlaybackHintsSelect        EQU        $103
  5785.  
  5786. kMusicComponentType                EQU        'musi'
  5787.  
  5788. ; typedef ComponentInstance  MusicComponent
  5789. ; MusicSynthesizerFlags
  5790.  
  5791. kSynthesizerDynamicVoice        EQU        1                    ; can reassign voices/channels (else, hogs all channels in mask 
  5792. kSynthesizerUsesMIDIPort        EQU        2                    ; must be patched through MIDI Manager 
  5793. kSynthesizerMicrotone            EQU        4                    ; can play microtonal scales 
  5794. kSynthesizerLimitedMicrotone    EQU        8                    ; can play microtones, but only on 1-voice parts 
  5795. kSynthesizerMixedDrums            EQU        16                    ; any part can play drum parts, total = instrument parts 
  5796. kSynthesizerSoftware            EQU        32                    ; implemented in main CPU software == uses cpu cycles 
  5797. kSynthesizerGMSuperset            EQU        8192
  5798. kSynthesizerGM                    EQU        16384                ; synth is a GM device 
  5799.  
  5800. ;
  5801. ; * Note that these controller numbers
  5802. ; * are _not_ identical to the MIDI controller numbers.
  5803. ; * These are _signed_ 8.8 values, and the LSB's are
  5804. ; * always sent to a MIDI device. Controllers 32-63 are
  5805. ; * reserved (for MIDI, they are LSB's for 0-31, but we
  5806. ; * always send both).
  5807. ; *
  5808. ; * The full range, therefore, is -128.00 to 127.7f.
  5809. ; *
  5810. ; * _Excepting_ _volume_, all controls default to zero.
  5811. ; *
  5812. ; * Pitch bend is specified in fractional semitones! No
  5813. ; * more "pitch bend range" nonsense. You can bend as far
  5814. ; * as you want, any time you want.
  5815. kControllerModulationWheel        EQU        1
  5816. kControllerBreath                EQU        2
  5817. kControllerFoot                    EQU        4
  5818. kControllerPortamentoTime        EQU        5
  5819. kControllerVolume                EQU        7
  5820. kControllerBalance                EQU        8
  5821. kControllerPan                    EQU        10                    ; 0 - "default", 1 - n: positioned in output 1-n (incl fractions) 
  5822. kControllerExpression            EQU        11
  5823. kControllerPitchBend            EQU        32                    ; positive & negative semitones, with 7 bits fraction 
  5824. kControllerAfterTouch            EQU        33
  5825. kControllerSustain                EQU        64                    ; boolean - positive for on, 0 or negative off 
  5826. kControllerPortamento            EQU        65                    ; boolean 
  5827. kControllerSostenuto            EQU        66                    ; boolean 
  5828. kControllerSoftPedal            EQU        67                    ; boolean 
  5829. kControllerReverb                EQU        91
  5830. kControllerTremolo                EQU        92
  5831. kControllerChorus                EQU        93
  5832. kControllerCeleste                EQU        94
  5833. kControllerPhaser                EQU        95
  5834.  
  5835. kControllerMaximum                EQU        $7FFF                ; +01111111.11111111 
  5836. kControllerMinimum                EQU        $8000                ; -10000000.00000000 
  5837.  
  5838. SynthesizerDescription     RECORD    0
  5839. synthesizerType             ds.l   1        ; offset: $0 (0)        ; synthesizer type (must be same as component subtype) 
  5840. name                     ds.l   8        ; offset: $4 (4)        ; text name of synthesizer type 
  5841. flags                     ds.l   1        ; offset: $24 (36)        ; from the above enum 
  5842. voiceCount                 ds.l   1        ; offset: $28 (40)        ; maximum polyphony 
  5843. partCount                 ds.l   1        ; offset: $2C (44)        ; maximum multi-timbrality (and midi channels) 
  5844. instrumentCount             ds.l   1        ; offset: $30 (48)        ; non gm, built in (rom) instruments only 
  5845. modifiableInstrumentCount ds.l   1        ; offset: $34 (52)        ; plus n-more are user modifiable 
  5846. channelMask                 ds.l   1        ; offset: $38 (56)        ; (midi device only) which channels device always uses 
  5847. drumPartCount             ds.l   1        ; offset: $3C (60)        ; maximum multi-timbrality of drum parts 
  5848. drumCount                 ds.l   1        ; offset: $40 (64)        ; non gm, built in (rom) drumkits only 
  5849. modifiableDrumCount         ds.l   1        ; offset: $44 (68)        ; plus n-more are user modifiable 
  5850. drumChannelMask             ds.l   1        ; offset: $48 (72)        ; (midi device only) which channels device always uses 
  5851. outputCount                 ds.l   1        ; offset: $4C (76)        ; number of audio outputs (usually two) 
  5852. latency                     ds.l   1        ; offset: $50 (80)        ; response time in µSec 
  5853. controllers                 ds.l   4        ; offset: $54 (84)        ; array of 128 bits 
  5854. gmInstruments             ds.l   4        ; offset: $64 (100)        ; array of 128 bits 
  5855. gmDrums                     ds.l   4        ; offset: $74 (116)        ; array of 128 bits 
  5856. sizeof                     EQU *            ; size:   $84 (132)
  5857.                         ENDR
  5858.  
  5859. ; typedef struct SynthesizerDescription  SynthesizerDescription
  5860.  
  5861. kVoiceCountDynamic                EQU        -1                    ; constant to use to specify dynamic voicing 
  5862.  
  5863. ToneDescription         RECORD    0
  5864. synthesizerType             ds.l   1        ; offset: $0 (0)        ; synthesizer type 
  5865. synthesizerName             ds.l   8        ; offset: $4 (4)        ; name of instantiation of synth 
  5866. instrumentName             ds.l   8        ; offset: $24 (36)        ; preferred name for human use 
  5867. instrumentNumber         ds.l   1        ; offset: $44 (68)        ; inst-number used if synth-name matches 
  5868. gmNumber                 ds.l   1        ; offset: $48 (72)        ; Best matching general MIDI number 
  5869. sizeof                     EQU *            ; size:   $4C (76)
  5870.                         ENDR
  5871.  
  5872. ; typedef struct ToneDescription  ToneDescription
  5873.  
  5874. kFirstDrumkit                    EQU        16384                ; (first value is "no drum". instrument numbers from 16384->16384+128 are drumkits, and for GM they are _defined_ drumkits! 
  5875. kLastDrumkit                    EQU        (kFirstDrumkit + 128)
  5876.  
  5877. ; InstrumentMatch
  5878. kInstrumentMatchSynthesizerType    EQU        1
  5879. kInstrumentMatchSynthesizerName    EQU        2
  5880. kInstrumentMatchName            EQU        4
  5881. kInstrumentMatchNumber            EQU        8
  5882. kInstrumentMatchGMNumber        EQU        16
  5883.  
  5884. ; KnobFlags
  5885. kKnobRealtime                    EQU        1                    ; Knob can be changed interactively as part of a sequence (ie knob can be changed at interrupt time) 
  5886. kKnobNextNote                    EQU        2                    ; Knob only takes effect on the next note played 
  5887. kKnobAction                        EQU        4                    ; setting the knob does something immediate 
  5888. kKnobNotInstrument                EQU        8                    ; indicates that the knob isn't in the instrument handle 
  5889. kKnobAffectsOthers                EQU        16                    ; other knobs will change value from this one 
  5890. kKnobMinorGroupStart            EQU        64                    ; knob is first in some logical subgroup of knobs 
  5891. kKnobGroupStart                    EQU        128                    ; knob is first in some logical group of knobs 
  5892. ; One of these may be used at a time. 
  5893. kKnobTypeNumber                    EQU        0 << 12
  5894. kKnobTypeBoolean                EQU        1 << 12
  5895. kKnobTypeNote                    EQU        2 << 12
  5896. kKnobTypePan                    EQU        3 << 12
  5897. kKnobTypeInstrument                EQU        4 << 12                ; knob value = reference to another instrument number 
  5898. kKnobTypeSetting                EQU        5 << 12                ; knob value is 1 of n different things (eg, fm algorithms) 
  5899.  
  5900. kUnknownKnobValue                EQU        $7FFFFFFF            ; a knob with this value means, we don't know it. 
  5901.  
  5902. KnobDescription         RECORD    0
  5903. name                     ds.l   8        ; offset: $0 (0)
  5904. lowValue                 ds.l   1        ; offset: $20 (32)
  5905. highValue                 ds.l   1        ; offset: $24 (36)
  5906. defaultValue             ds.l   1        ; offset: $28 (40)        ; a default instrument is made of all default values 
  5907. flags                     ds.l   1        ; offset: $2C (44)
  5908. sizeof                     EQU *            ; size:   $30 (48)
  5909.                         ENDR
  5910.  
  5911. ; typedef struct KnobDescription  KnobDescription
  5912. InstrumentData             RECORD    0
  5913. tone                     ds     ToneDescription ; offset: $0 (0)
  5914. knobCount                 ds.l   1        ; offset: $4C (76)
  5915. knob                     ds.l   1        ; offset: $50 (80)
  5916. sizeof                     EQU *            ; size:   $54 (84)
  5917.                         ENDR
  5918.  
  5919. ; typedef struct InstrumentData  InstrumentData, **InstrumentDataHandle
  5920. FlatInstrument             RECORD    0
  5921. tone                     ds     ToneDescription ; offset: $0 (0)
  5922. size                     ds.l   1        ; offset: $4C (76)        ; size in bytes of the following data, including size field (excluding tonedescription) 
  5923. data                     ds.b   4        ; offset: $50 (80)
  5924. sizeof                     EQU *            ; size:   $54 (84)
  5925.                         ENDR
  5926.  
  5927. ; typedef struct FlatInstrument  FlatInstrument
  5928. InstrumentAboutInfo     RECORD    0
  5929. p                         ds.l   1        ; offset: $0 (0)
  5930. author                     ds.l   64        ; offset: $4 (4)
  5931. copyright                 ds.l   64        ; offset: $104 (260)
  5932. other                     ds.l   64        ; offset: $204 (516)
  5933. sizeof                     EQU *            ; size:   $304 (772)
  5934.                         ENDR
  5935.  
  5936. ; typedef struct InstrumentAboutInfo  InstrumentAboutInfo
  5937. MusicMIDIPacket         RECORD    0
  5938. length                     ds.w   1        ; offset: $0 (0)
  5939. reserved                 ds.l   1        ; offset: $2 (2)
  5940. data                     ds.b   249        ; offset: $6 (6)
  5941.                          ORG 256
  5942. sizeof                     EQU *            ; size:   $100 (256)
  5943.                         ENDR
  5944.  
  5945. ; typedef struct MusicMIDIPacket  MusicMIDIPacket
  5946.  
  5947. kMusicFirstSelect                EQU        0
  5948. kMusicGetDescriptionSelect        EQU        1
  5949. kMusicGetPartSelect                EQU        2
  5950. kMusicSetPartSelect                EQU        3
  5951. kMusicSetInstrumentNumberSelect    EQU        4
  5952. kMusicGetInstrumentNumberSelect    EQU        5
  5953. kMusicStoreInstrumentSelect        EQU        6
  5954. kMusicGetInstrumentSelect        EQU        7
  5955. kMusicSetInstrumentSelect        EQU        8
  5956. kMusicDummyOne                    EQU        9
  5957. kMusicDummyTwo                    EQU        10
  5958. kMusicDummyThree                EQU        11
  5959. kMusicDummyFour                    EQU        12
  5960. kMusicGetInstrumentKnobDescriptionSelect EQU        13
  5961. kMusicGetDrumKnobDescriptionSelect EQU        14
  5962. kMusicGetKnobDescriptionSelect    EQU        15
  5963. kMusicGetPartKnobSelect            EQU        16
  5964. kMusicSetPartKnobSelect            EQU        17
  5965. kMusicGetKnobSelect                EQU        18
  5966. kMusicSetKnobSelect                EQU        19
  5967. kMusicGetPartNameSelect            EQU        20
  5968. kMusicSetPartNameSelect            EQU        21
  5969. kMusicFindToneSelect            EQU        22
  5970. kMusicPlayNoteSelect            EQU        23
  5971. kMusicResetPartSelect            EQU        24
  5972. kMusicSetControllerSelect        EQU        25
  5973. kMusicGetControllerSelect        EQU        26
  5974. kMusicGetMIDIProcSelect            EQU        27
  5975. kMusicSetMIDIProcSelect            EQU        28
  5976. kMusicGetInstrumentNamesSelect    EQU        29
  5977. kMusicGetDrumNamesSelect        EQU        30
  5978. kMusicGetMasterTuneSelect        EQU        31
  5979. kMusicSetMasterTuneSelect        EQU        32
  5980. kMusicSetFlatInstrumentSelect    EQU        33
  5981. kMusicGetInstrumentAboutInfoSelect EQU        34
  5982.  
  5983. notImplementedMusicErr            EQU        ($80000000 | ((-2100 - 1)))
  5984. cantSendToSynthesizerErr        EQU        ($80000000 | ((-2100 - 2)))
  5985. cantReceiveFromSynthesizerErr    EQU        ($80000000 | ((-2100 - 3)))
  5986. illegalVoiceAllocationErr        EQU        ($80000000 | ((-2100 - 4)))
  5987. illegalPartErr                    EQU        ($80000000 | ((-2100 - 5)))
  5988. illegalChannelErr                EQU        ($80000000 | ((-2100 - 6)))
  5989. illegalKnobErr                    EQU        ($80000000 | ((-2100 - 7)))
  5990. illegalKnobValueErr                EQU        ($80000000 | ((-2100 - 8)))
  5991. illegalInstrumentErr            EQU        ($80000000 | ((-2100 - 9)))
  5992. illegalControllerErr            EQU        ($80000000 | ((-2100 - 10)))
  5993. midiManagerAbsentErr            EQU        ($80000000 | ((-2100 - 11)))
  5994. synthesizerNotRespondingErr        EQU        ($80000000 | ((-2100 - 12)))
  5995. synthesizerErr                    EQU        ($80000000 | ((-2100 - 13)))
  5996. illegalNoteChannelErr            EQU        ($80000000 | ((-2100 - 14)))
  5997. noteChannelNotAllocatedErr        EQU        ($80000000 | ((-2100 - 15)))
  5998. tunePlayerFullErr                EQU        ($80000000 | ((-2100 - 16)))
  5999. tuneParseErr                    EQU        ($80000000 | ((-2100 - 17)))
  6000.  
  6001. kGMType                            EQU        'gm  '
  6002.  
  6003. ;-----------------------------------------
  6004. ;    Capabilities and Voice Allocation
  6005. ;-----------------------------------------
  6006. ;
  6007. ; pascal ComponentResult MusicGetPart(MusicComponent mc, long part, long *midiChannel, long *polyphony)
  6008. ;
  6009.     IF ¬ GENERATINGCFM THEN
  6010.         Macro
  6011.         _MusicGetPart
  6012.             dc.w     $2F3C
  6013.             dc.w     $000C
  6014.             dc.w     $0002
  6015.             moveq    #0,d0
  6016.             dc.w     $A82A
  6017.         EndM
  6018.     ELSE
  6019.         IMPORT_CFM_FUNCTION    MusicGetPart
  6020.     ENDIF
  6021.  
  6022. ;
  6023. ; pascal ComponentResult MusicSetPart(MusicComponent mc, long part, long midiChannel, long polyphony)
  6024. ;
  6025.     IF ¬ GENERATINGCFM THEN
  6026.         Macro
  6027.         _MusicSetPart
  6028.             dc.w     $2F3C
  6029.             dc.w     $000C
  6030.             dc.w     $0003
  6031.             moveq    #0,d0
  6032.             dc.w     $A82A
  6033.         EndM
  6034.     ELSE
  6035.         IMPORT_CFM_FUNCTION    MusicSetPart
  6036.     ENDIF
  6037.  
  6038. ;
  6039. ; pascal ComponentResult MusicGetDescription(MusicComponent mc, SynthesizerDescription *sd)
  6040. ;
  6041.     IF ¬ GENERATINGCFM THEN
  6042.         Macro
  6043.         _MusicGetDescription
  6044.             dc.w     $2F3C
  6045.             dc.w     $0004
  6046.             dc.w     $0001
  6047.             moveq    #0,d0
  6048.             dc.w     $A82A
  6049.         EndM
  6050.     ELSE
  6051.         IMPORT_CFM_FUNCTION    MusicGetDescription
  6052.     ENDIF
  6053.  
  6054. ;
  6055. ; pascal ComponentResult MusicGetInstrumentAboutInfo(MusicComponent mc, long part, InstrumentAboutInfo *iai)
  6056. ;
  6057.     IF ¬ GENERATINGCFM THEN
  6058.         Macro
  6059.         _MusicGetInstrumentAboutInfo
  6060.             dc.w     $2F3C
  6061.             dc.w     $0008
  6062.             dc.w     $0022
  6063.             moveq    #0,d0
  6064.             dc.w     $A82A
  6065.         EndM
  6066.     ELSE
  6067.         IMPORT_CFM_FUNCTION    MusicGetInstrumentAboutInfo
  6068.     ENDIF
  6069.  
  6070. ;-----------------------------------------
  6071. ;    Instrument Loading and Storing
  6072. ;-----------------------------------------
  6073. ;
  6074. ; pascal ComponentResult MusicSetInstrumentNumber(MusicComponent mc, long part, long instrumentNumber)
  6075. ;
  6076.     IF ¬ GENERATINGCFM THEN
  6077.         Macro
  6078.         _MusicSetInstrumentNumber
  6079.             dc.w     $2F3C
  6080.             dc.w     $0008
  6081.             dc.w     $0004
  6082.             moveq    #0,d0
  6083.             dc.w     $A82A
  6084.         EndM
  6085.     ELSE
  6086.         IMPORT_CFM_FUNCTION    MusicSetInstrumentNumber
  6087.     ENDIF
  6088.  
  6089. ;
  6090. ; pascal ComponentResult MusicGetInstrumentNumber(MusicComponent mc, long part)
  6091. ;
  6092.     IF ¬ GENERATINGCFM THEN
  6093.         Macro
  6094.         _MusicGetInstrumentNumber
  6095.             dc.w     $2F3C
  6096.             dc.w     $0004
  6097.             dc.w     $0005
  6098.             moveq    #0,d0
  6099.             dc.w     $A82A
  6100.         EndM
  6101.     ELSE
  6102.         IMPORT_CFM_FUNCTION    MusicGetInstrumentNumber
  6103.     ENDIF
  6104.  
  6105. ;
  6106. ; pascal ComponentResult MusicStoreInstrument(MusicComponent mc, long part, long instrumentNumber)
  6107. ;
  6108.     IF ¬ GENERATINGCFM THEN
  6109.         Macro
  6110.         _MusicStoreInstrument
  6111.             dc.w     $2F3C
  6112.             dc.w     $0008
  6113.             dc.w     $0006
  6114.             moveq    #0,d0
  6115.             dc.w     $A82A
  6116.         EndM
  6117.     ELSE
  6118.         IMPORT_CFM_FUNCTION    MusicStoreInstrument
  6119.     ENDIF
  6120.  
  6121. ;
  6122. ; pascal ComponentResult MusicGetInstrument(MusicComponent mc, long part, InstrumentDataHandle *iH)
  6123. ;
  6124.     IF ¬ GENERATINGCFM THEN
  6125.         Macro
  6126.         _MusicGetInstrument
  6127.             dc.w     $2F3C
  6128.             dc.w     $0008
  6129.             dc.w     $0007
  6130.             moveq    #0,d0
  6131.             dc.w     $A82A
  6132.         EndM
  6133.     ELSE
  6134.         IMPORT_CFM_FUNCTION    MusicGetInstrument
  6135.     ENDIF
  6136.  
  6137. ;
  6138. ; pascal ComponentResult MusicSetInstrument(MusicComponent mc, long part, InstrumentDataHandle iH)
  6139. ;
  6140.     IF ¬ GENERATINGCFM THEN
  6141.         Macro
  6142.         _MusicSetInstrument
  6143.             dc.w     $2F3C
  6144.             dc.w     $0008
  6145.             dc.w     $0008
  6146.             moveq    #0,d0
  6147.             dc.w     $A82A
  6148.         EndM
  6149.     ELSE
  6150.         IMPORT_CFM_FUNCTION    MusicSetInstrument
  6151.     ENDIF
  6152.  
  6153. ;
  6154. ; pascal ComponentResult MusicSetFlatInstrument(MusicComponent mc, long part, FlatInstrument *flatInstrument)
  6155. ;
  6156.     IF ¬ GENERATINGCFM THEN
  6157.         Macro
  6158.         _MusicSetFlatInstrument
  6159.             dc.w     $2F3C
  6160.             dc.w     $0008
  6161.             dc.w     $0021
  6162.             moveq    #0,d0
  6163.             dc.w     $A82A
  6164.         EndM
  6165.     ELSE
  6166.         IMPORT_CFM_FUNCTION    MusicSetFlatInstrument
  6167.     ENDIF
  6168.  
  6169. ;-----------------------------------------
  6170. ;    Instrument Knobs
  6171. ;-----------------------------------------
  6172. ;
  6173. ; pascal ComponentResult MusicGetInstrumentKnobDescription(MusicComponent mc, long knobNumber, KnobDescription *mkd)
  6174. ;
  6175.     IF ¬ GENERATINGCFM THEN
  6176.         Macro
  6177.         _MusicGetInstrumentKnobDescription
  6178.             dc.w     $2F3C
  6179.             dc.w     $0008
  6180.             dc.w     $000D
  6181.             moveq    #0,d0
  6182.             dc.w     $A82A
  6183.         EndM
  6184.     ELSE
  6185.         IMPORT_CFM_FUNCTION    MusicGetInstrumentKnobDescription
  6186.     ENDIF
  6187.  
  6188. ;
  6189. ; pascal ComponentResult MusicGetDrumKnobDescription(MusicComponent mc, long knobNumber, KnobDescription *mkd)
  6190. ;
  6191.     IF ¬ GENERATINGCFM THEN
  6192.         Macro
  6193.         _MusicGetDrumKnobDescription
  6194.             dc.w     $2F3C
  6195.             dc.w     $0008
  6196.             dc.w     $000E
  6197.             moveq    #0,d0
  6198.             dc.w     $A82A
  6199.         EndM
  6200.     ELSE
  6201.         IMPORT_CFM_FUNCTION    MusicGetDrumKnobDescription
  6202.     ENDIF
  6203.  
  6204. ;
  6205. ; pascal ComponentResult MusicGetPartKnob(MusicComponent mc, long part, long knobNumber)
  6206. ;
  6207.     IF ¬ GENERATINGCFM THEN
  6208.         Macro
  6209.         _MusicGetPartKnob
  6210.             dc.w     $2F3C
  6211.             dc.w     $0008
  6212.             dc.w     $0010
  6213.             moveq    #0,d0
  6214.             dc.w     $A82A
  6215.         EndM
  6216.     ELSE
  6217.         IMPORT_CFM_FUNCTION    MusicGetPartKnob
  6218.     ENDIF
  6219.  
  6220. ;
  6221. ; pascal ComponentResult MusicSetPartKnob(MusicComponent mc, long part, long knobNumber, long knobValue)
  6222. ;
  6223.     IF ¬ GENERATINGCFM THEN
  6224.         Macro
  6225.         _MusicSetPartKnob
  6226.             dc.w     $2F3C
  6227.             dc.w     $000C
  6228.             dc.w     $0011
  6229.             moveq    #0,d0
  6230.             dc.w     $A82A
  6231.         EndM
  6232.     ELSE
  6233.         IMPORT_CFM_FUNCTION    MusicSetPartKnob
  6234.     ENDIF
  6235.  
  6236. ;-----------------------------------------
  6237. ;    Synthesizer Knobs
  6238. ;-----------------------------------------
  6239. ;
  6240. ; pascal ComponentResult MusicGetKnobDescription(MusicComponent mc, long knobNumber, KnobDescription *mkd)
  6241. ;
  6242.     IF ¬ GENERATINGCFM THEN
  6243.         Macro
  6244.         _MusicGetKnobDescription
  6245.             dc.w     $2F3C
  6246.             dc.w     $0008
  6247.             dc.w     $000F
  6248.             moveq    #0,d0
  6249.             dc.w     $A82A
  6250.         EndM
  6251.     ELSE
  6252.         IMPORT_CFM_FUNCTION    MusicGetKnobDescription
  6253.     ENDIF
  6254.  
  6255. ;
  6256. ; pascal ComponentResult MusicGetKnob(MusicComponent mc, long knobNumber)
  6257. ;
  6258.     IF ¬ GENERATINGCFM THEN
  6259.         Macro
  6260.         _MusicGetKnob
  6261.             dc.w     $2F3C
  6262.             dc.w     $0004
  6263.             dc.w     $0012
  6264.             moveq    #0,d0
  6265.             dc.w     $A82A
  6266.         EndM
  6267.     ELSE
  6268.         IMPORT_CFM_FUNCTION    MusicGetKnob
  6269.     ENDIF
  6270.  
  6271. ;
  6272. ; pascal ComponentResult MusicSetKnob(MusicComponent mc, long knobNumber, long knobValue)
  6273. ;
  6274.     IF ¬ GENERATINGCFM THEN
  6275.         Macro
  6276.         _MusicSetKnob
  6277.             dc.w     $2F3C
  6278.             dc.w     $0008
  6279.             dc.w     $0013
  6280.             moveq    #0,d0
  6281.             dc.w     $A82A
  6282.         EndM
  6283.     ELSE
  6284.         IMPORT_CFM_FUNCTION    MusicSetKnob
  6285.     ENDIF
  6286.  
  6287. ;
  6288. ; pascal ComponentResult MusicSetMasterTune(MusicComponent mc, Fixed masterTune)
  6289. ;
  6290.     IF ¬ GENERATINGCFM THEN
  6291.         Macro
  6292.         _MusicSetMasterTune
  6293.             dc.w     $2F3C
  6294.             dc.w     $0004
  6295.             dc.w     $0020
  6296.             moveq    #0,d0
  6297.             dc.w     $A82A
  6298.         EndM
  6299.     ELSE
  6300.         IMPORT_CFM_FUNCTION    MusicSetMasterTune
  6301.     ENDIF
  6302.  
  6303. ;
  6304. ; pascal ComponentResult MusicGetMasterTune(MusicComponent mc)
  6305. ;
  6306.     IF ¬ GENERATINGCFM THEN
  6307.         Macro
  6308.         _MusicGetMasterTune
  6309.             dc.w     $2F3C
  6310.             dc.w     $0000
  6311.             dc.w     $001F
  6312.             moveq    #0,d0
  6313.             dc.w     $A82A
  6314.         EndM
  6315.     ELSE
  6316.         IMPORT_CFM_FUNCTION    MusicGetMasterTune
  6317.     ENDIF
  6318.  
  6319. ;-----------------------------------------
  6320. ;    Names of Instruments
  6321. ;-----------------------------------------
  6322. ;
  6323. ; pascal ComponentResult MusicGetPartName(MusicComponent mc, long part, Str31 name)
  6324. ;
  6325.     IF ¬ GENERATINGCFM THEN
  6326.         Macro
  6327.         _MusicGetPartName
  6328.             dc.w     $2F3C
  6329.             dc.w     $0008
  6330.             dc.w     $0014
  6331.             moveq    #0,d0
  6332.             dc.w     $A82A
  6333.         EndM
  6334.     ELSE
  6335.         IMPORT_CFM_FUNCTION    MusicGetPartName
  6336.     ENDIF
  6337.  
  6338. ;
  6339. ; pascal ComponentResult MusicSetPartName(MusicComponent mc, long part, Str31 name)
  6340. ;
  6341.     IF ¬ GENERATINGCFM THEN
  6342.         Macro
  6343.         _MusicSetPartName
  6344.             dc.w     $2F3C
  6345.             dc.w     $0008
  6346.             dc.w     $0015
  6347.             moveq    #0,d0
  6348.             dc.w     $A82A
  6349.         EndM
  6350.     ELSE
  6351.         IMPORT_CFM_FUNCTION    MusicSetPartName
  6352.     ENDIF
  6353.  
  6354. ;
  6355. ; pascal ComponentResult MusicFindTone(MusicComponent mc, ToneDescription *td, long *instrumentNumber, unsigned long *fit)
  6356. ;
  6357.     IF ¬ GENERATINGCFM THEN
  6358.         Macro
  6359.         _MusicFindTone
  6360.             dc.w     $2F3C
  6361.             dc.w     $000C
  6362.             dc.w     $0016
  6363.             moveq    #0,d0
  6364.             dc.w     $A82A
  6365.         EndM
  6366.     ELSE
  6367.         IMPORT_CFM_FUNCTION    MusicFindTone
  6368.     ENDIF
  6369.  
  6370. ;
  6371. ; pascal ComponentResult MusicGetInstrumentNames(MusicComponent mc, long modifiableInstruments, Handle *instrumentNames, Handle *instrumentCategoryLasts, Handle *instrumentCategoryNames)
  6372. ;
  6373.     IF ¬ GENERATINGCFM THEN
  6374.         Macro
  6375.         _MusicGetInstrumentNames
  6376.             dc.w     $2F3C
  6377.             dc.w     $0010
  6378.             dc.w     $001D
  6379.             moveq    #0,d0
  6380.             dc.w     $A82A
  6381.         EndM
  6382.     ELSE
  6383.         IMPORT_CFM_FUNCTION    MusicGetInstrumentNames
  6384.     ENDIF
  6385.  
  6386. ;
  6387. ; pascal ComponentResult MusicGetDrumNames(MusicComponent mc, long modifiableInstruments, Handle *instrumentNumbers, Handle *instrumentNames)
  6388. ;
  6389.     IF ¬ GENERATINGCFM THEN
  6390.         Macro
  6391.         _MusicGetDrumNames
  6392.             dc.w     $2F3C
  6393.             dc.w     $000C
  6394.             dc.w     $001E
  6395.             moveq    #0,d0
  6396.             dc.w     $A82A
  6397.         EndM
  6398.     ELSE
  6399.         IMPORT_CFM_FUNCTION    MusicGetDrumNames
  6400.     ENDIF
  6401.  
  6402. ;-----------------------------------------
  6403. ;    Realtime Actions
  6404. ;-----------------------------------------
  6405. ;
  6406. ; pascal ComponentResult MusicPlayNote(MusicComponent mc, long part, long pitch, long velocity)
  6407. ;
  6408.     IF ¬ GENERATINGCFM THEN
  6409.         Macro
  6410.         _MusicPlayNote
  6411.             dc.w     $2F3C
  6412.             dc.w     $000C
  6413.             dc.w     $0017
  6414.             moveq    #0,d0
  6415.             dc.w     $A82A
  6416.         EndM
  6417.     ELSE
  6418.         IMPORT_CFM_FUNCTION    MusicPlayNote
  6419.     ENDIF
  6420.  
  6421. ;
  6422. ; pascal ComponentResult MusicResetPart(MusicComponent mc, long part)
  6423. ;
  6424.     IF ¬ GENERATINGCFM THEN
  6425.         Macro
  6426.         _MusicResetPart
  6427.             dc.w     $2F3C
  6428.             dc.w     $0004
  6429.             dc.w     $0018
  6430.             moveq    #0,d0
  6431.             dc.w     $A82A
  6432.         EndM
  6433.     ELSE
  6434.         IMPORT_CFM_FUNCTION    MusicResetPart
  6435.     ENDIF
  6436.  
  6437. ;
  6438. ; pascal ComponentResult MusicSetController(MusicComponent mc, long part, long controllerNumber, long controllerValue)
  6439. ;
  6440.     IF ¬ GENERATINGCFM THEN
  6441.         Macro
  6442.         _MusicSetController
  6443.             dc.w     $2F3C
  6444.             dc.w     $000C
  6445.             dc.w     $0019
  6446.             moveq    #0,d0
  6447.             dc.w     $A82A
  6448.         EndM
  6449.     ELSE
  6450.         IMPORT_CFM_FUNCTION    MusicSetController
  6451.     ENDIF
  6452.  
  6453. ;
  6454. ; pascal ComponentResult MusicGetController(MusicComponent mc, long part, long controllerNumber)
  6455. ;
  6456.     IF ¬ GENERATINGCFM THEN
  6457.         Macro
  6458.         _MusicGetController
  6459.             dc.w     $2F3C
  6460.             dc.w     $0008
  6461.             dc.w     $001A
  6462.             moveq    #0,d0
  6463.             dc.w     $A82A
  6464.         EndM
  6465.     ELSE
  6466.         IMPORT_CFM_FUNCTION    MusicGetController
  6467.     ENDIF
  6468.  
  6469. ;-----------------------------------------
  6470. ;    Finding the Hardware
  6471. ;-----------------------------------------
  6472. ;
  6473. ; pascal ComponentResult MusicGetMIDIProc(MusicComponent mc, MusicMIDISendUPP *midiSendProc, long *refCon)
  6474. ;
  6475.     IF ¬ GENERATINGCFM THEN
  6476.         Macro
  6477.         _MusicGetMIDIProc
  6478.             dc.w     $2F3C
  6479.             dc.w     $0008
  6480.             dc.w     $001B
  6481.             moveq    #0,d0
  6482.             dc.w     $A82A
  6483.         EndM
  6484.     ELSE
  6485.         IMPORT_CFM_FUNCTION    MusicGetMIDIProc
  6486.     ENDIF
  6487.  
  6488. ;
  6489. ; pascal ComponentResult MusicSetMIDIProc(MusicComponent mc, MusicMIDISendUPP midiSendProc, long refCon)
  6490. ;
  6491.     IF ¬ GENERATINGCFM THEN
  6492.         Macro
  6493.         _MusicSetMIDIProc
  6494.             dc.w     $2F3C
  6495.             dc.w     $0008
  6496.             dc.w     $001C
  6497.             moveq    #0,d0
  6498.             dc.w     $A82A
  6499.         EndM
  6500.     ELSE
  6501.         IMPORT_CFM_FUNCTION    MusicSetMIDIProc
  6502.     ENDIF
  6503.  
  6504. ;--------------------------
  6505. ;    Types
  6506. ;--------------------------
  6507. ; typedef void                 *NoteChannel
  6508. SynthesizerConnections     RECORD    0
  6509. clientID                 ds.l   1        ; offset: $0 (0)
  6510. inputPortID                 ds.l   1        ; offset: $4 (4)
  6511. outputPortID             ds.l   1        ; offset: $8 (8)
  6512. midiChannel                 ds.l   1        ; offset: $C (12)        ; The system channel; others are configurable (or the nubus slot number) 
  6513. flags                     ds.l   1        ; offset: $10 (16)
  6514. reserved                 ds.l   3        ; offset: $14 (20)        ; should be zero 
  6515. sizeof                     EQU *            ; size:   $20 (32)
  6516.                         ENDR
  6517.  
  6518. ; typedef struct SynthesizerConnections  SynthesizerConnections
  6519. NoteRequest             RECORD    0
  6520. polyphony                 ds.l   1        ; offset: $0 (0)        ; Maximum number of voices 
  6521. typicalPolyphony         ds.l   1        ; offset: $4 (4)        ; Hint for level mixing 
  6522. tone                     ds     ToneDescription ; offset: $8 (8)
  6523. sizeof                     EQU *            ; size:   $54 (84)
  6524.                         ENDR
  6525.  
  6526. ; typedef struct NoteRequest  NoteRequest
  6527.  
  6528. kNAFirstSelector                EQU        -7
  6529. kNATargetSelect                    EQU        -6
  6530. kNARegisterSelect                EQU        -5
  6531. kNAVersionSelect                EQU        -4
  6532. kNACanDoSelect                    EQU        -3
  6533. kNACloseSelect                    EQU        -2
  6534. kNAOpenSelect                    EQU        -1
  6535. kNARegisterMusicDeviceSelect    EQU        0
  6536. kNAUnregisterMusicDeviceSelect    EQU        1
  6537. kNAGetRegisteredMusicDeviceSelect EQU        2
  6538. kNASaveMusicConfigurationSelect    EQU        3
  6539. kNANewNoteChannelSelect            EQU        4
  6540. kNADisposeNoteChannelSelect        EQU        5
  6541. kNAGetNoteChannelInfoSelect        EQU        6
  6542. kNAPrerollNoteChannelSelect        EQU        7
  6543. kNAUnrollNoteChannelSelect        EQU        8
  6544. kNAEngageNoteChannelSelect        EQU        9
  6545. kNADisengageNoteChannelSelect    EQU        10
  6546. kNASetNoteChannelVolumeSelect    EQU        11
  6547. kNAResetNoteChannelSelect        EQU        12
  6548. kNAPlayNoteSelect                EQU        13
  6549. kNASetControllerSelect            EQU        14
  6550. kNASetKnobSelect                EQU        15
  6551. kNAFindNoteChannelToneSelect    EQU        16
  6552. kNASetNoteChannelInstrumentSelect EQU        17
  6553. kNAPickInstrumentSelect            EQU        18
  6554. kNAPickArrangementSelect        EQU        19
  6555. kNAGetStatusBlockSelect            EQU        20
  6556. kNASetDefaultMIDIInputSelect    EQU        21
  6557. kNAGetDefaultMIDIInputSelect    EQU        22
  6558. kNAGetNoteChannelStateSelect    EQU        23
  6559. kNASetNoteChannelStateSelect    EQU        24
  6560. kNAUseDefaultMIDIInputSelect    EQU        25
  6561. kNALoseDefaultMIDIInputSelect    EQU        26
  6562. kNAStuffToneDescriptionSelect    EQU        27
  6563. kNACopyrightDialogSelect        EQU        28
  6564. kNASetFlatInstrumentSelect        EQU        29
  6565. kNASetInstrumentSelect            EQU        30
  6566. kNALastSelector                    EQU        31
  6567.  
  6568. ; typedef ComponentInstance  NoteAllocator
  6569.  
  6570. kPickDontMix                    EQU        1                    ; dont mix instruments with drum sounds 
  6571. kPickSameSynth                    EQU        2                    ; only allow the same device that went in, to come out 
  6572.  
  6573. kNoteAllocatorType                EQU        'nota'
  6574.  
  6575. ;--------------------------------
  6576. ;    Note Allocator Prototypes
  6577. ;--------------------------------
  6578. ;
  6579. ; * System Configuration
  6580. ;
  6581. ; pascal ComponentResult NARegisterMusicDevice(NoteAllocator na, OSType synthType, Str31 name, SynthesizerConnections *connections)
  6582. ;
  6583.     IF ¬ GENERATINGCFM THEN
  6584.         Macro
  6585.         _NARegisterMusicDevice
  6586.             dc.w     $2F3C
  6587.             dc.w     $000C
  6588.             dc.w     $0000
  6589.             moveq    #0,d0
  6590.             dc.w     $A82A
  6591.         EndM
  6592.     ELSE
  6593.         IMPORT_CFM_FUNCTION    NARegisterMusicDevice
  6594.     ENDIF
  6595.  
  6596. ;
  6597. ; pascal ComponentResult NAUnregisterMusicDevice(NoteAllocator na, long index)
  6598. ;
  6599.     IF ¬ GENERATINGCFM THEN
  6600.         Macro
  6601.         _NAUnregisterMusicDevice
  6602.             dc.w     $2F3C
  6603.             dc.w     $0004
  6604.             dc.w     $0001
  6605.             moveq    #0,d0
  6606.             dc.w     $A82A
  6607.         EndM
  6608.     ELSE
  6609.         IMPORT_CFM_FUNCTION    NAUnregisterMusicDevice
  6610.     ENDIF
  6611.  
  6612. ;
  6613. ; pascal ComponentResult NAGetRegisteredMusicDevice(NoteAllocator na, long index, OSType *synthType, Str31 name, SynthesizerConnections *connections, MusicComponent *mc)
  6614. ;
  6615.     IF ¬ GENERATINGCFM THEN
  6616.         Macro
  6617.         _NAGetRegisteredMusicDevice
  6618.             dc.w     $2F3C
  6619.             dc.w     $0014
  6620.             dc.w     $0002
  6621.             moveq    #0,d0
  6622.             dc.w     $A82A
  6623.         EndM
  6624.     ELSE
  6625.         IMPORT_CFM_FUNCTION    NAGetRegisteredMusicDevice
  6626.     ENDIF
  6627.  
  6628. ;
  6629. ; pascal ComponentResult NASetDefaultMIDIInput(NoteAllocator na, SynthesizerConnections *sc)
  6630. ;
  6631.     IF ¬ GENERATINGCFM THEN
  6632.         Macro
  6633.         _NASetDefaultMIDIInput
  6634.             dc.w     $2F3C
  6635.             dc.w     $0004
  6636.             dc.w     $0015
  6637.             moveq    #0,d0
  6638.             dc.w     $A82A
  6639.         EndM
  6640.     ELSE
  6641.         IMPORT_CFM_FUNCTION    NASetDefaultMIDIInput
  6642.     ENDIF
  6643.  
  6644. ;
  6645. ; pascal ComponentResult NAGetDefaultMIDIInput(NoteAllocator na, SynthesizerConnections *sc)
  6646. ;
  6647.     IF ¬ GENERATINGCFM THEN
  6648.         Macro
  6649.         _NAGetDefaultMIDIInput
  6650.             dc.w     $2F3C
  6651.             dc.w     $0004
  6652.             dc.w     $0016
  6653.             moveq    #0,d0
  6654.             dc.w     $A82A
  6655.         EndM
  6656.     ELSE
  6657.         IMPORT_CFM_FUNCTION    NAGetDefaultMIDIInput
  6658.     ENDIF
  6659.  
  6660. ;
  6661. ; pascal ComponentResult NASaveMusicConfiguration(NoteAllocator na)
  6662. ;
  6663.     IF ¬ GENERATINGCFM THEN
  6664.         Macro
  6665.         _NASaveMusicConfiguration
  6666.             dc.w     $2F3C
  6667.             dc.w     $0000
  6668.             dc.w     $0003
  6669.             moveq    #0,d0
  6670.             dc.w     $A82A
  6671.         EndM
  6672.     ELSE
  6673.         IMPORT_CFM_FUNCTION    NASaveMusicConfiguration
  6674.     ENDIF
  6675.  
  6676. ;
  6677. ; * Allocation
  6678. ;
  6679. ; pascal ComponentResult NANewNoteChannel(NoteAllocator na, NoteRequest *noteRequest, NoteChannel *outChannel)
  6680. ;
  6681.     IF ¬ GENERATINGCFM THEN
  6682.         Macro
  6683.         _NANewNoteChannel
  6684.             dc.w     $2F3C
  6685.             dc.w     $0008
  6686.             dc.w     $0004
  6687.             moveq    #0,d0
  6688.             dc.w     $A82A
  6689.         EndM
  6690.     ELSE
  6691.         IMPORT_CFM_FUNCTION    NANewNoteChannel
  6692.     ENDIF
  6693.  
  6694. ;
  6695. ; pascal ComponentResult NADisposeNoteChannel(NoteAllocator na, NoteChannel noteChannel)
  6696. ;
  6697.     IF ¬ GENERATINGCFM THEN
  6698.         Macro
  6699.         _NADisposeNoteChannel
  6700.             dc.w     $2F3C
  6701.             dc.w     $0004
  6702.             dc.w     $0005
  6703.             moveq    #0,d0
  6704.             dc.w     $A82A
  6705.         EndM
  6706.     ELSE
  6707.         IMPORT_CFM_FUNCTION    NADisposeNoteChannel
  6708.     ENDIF
  6709.  
  6710. ;
  6711. ; pascal ComponentResult NAGetNoteChannelInfo(NoteAllocator na, NoteChannel noteChannel, long *index, long *part)
  6712. ;
  6713.     IF ¬ GENERATINGCFM THEN
  6714.         Macro
  6715.         _NAGetNoteChannelInfo
  6716.             dc.w     $2F3C
  6717.             dc.w     $000C
  6718.             dc.w     $0006
  6719.             moveq    #0,d0
  6720.             dc.w     $A82A
  6721.         EndM
  6722.     ELSE
  6723.         IMPORT_CFM_FUNCTION    NAGetNoteChannelInfo
  6724.     ENDIF
  6725.  
  6726. ;
  6727. ; pascal ComponentResult NAUseDefaultMIDIInput(NoteAllocator na, MusicMIDIReadHookUPP readHook, long refCon, unsigned long flags)
  6728. ;
  6729.     IF ¬ GENERATINGCFM THEN
  6730.         Macro
  6731.         _NAUseDefaultMIDIInput
  6732.             dc.w     $2F3C
  6733.             dc.w     $000C
  6734.             dc.w     $0019
  6735.             moveq    #0,d0
  6736.             dc.w     $A82A
  6737.         EndM
  6738.     ELSE
  6739.         IMPORT_CFM_FUNCTION    NAUseDefaultMIDIInput
  6740.     ENDIF
  6741.  
  6742. ;
  6743. ; pascal ComponentResult NALoseDefaultMIDIInput(NoteAllocator na)
  6744. ;
  6745.     IF ¬ GENERATINGCFM THEN
  6746.         Macro
  6747.         _NALoseDefaultMIDIInput
  6748.             dc.w     $2F3C
  6749.             dc.w     $0000
  6750.             dc.w     $001A
  6751.             moveq    #0,d0
  6752.             dc.w     $A82A
  6753.         EndM
  6754.     ELSE
  6755.         IMPORT_CFM_FUNCTION    NALoseDefaultMIDIInput
  6756.     ENDIF
  6757.  
  6758. ;
  6759. ; * Setup
  6760. ;
  6761. ; pascal ComponentResult NAPrerollNoteChannel(NoteAllocator na, NoteChannel noteChannel)
  6762. ;
  6763.     IF ¬ GENERATINGCFM THEN
  6764.         Macro
  6765.         _NAPrerollNoteChannel
  6766.             dc.w     $2F3C
  6767.             dc.w     $0004
  6768.             dc.w     $0007
  6769.             moveq    #0,d0
  6770.             dc.w     $A82A
  6771.         EndM
  6772.     ELSE
  6773.         IMPORT_CFM_FUNCTION    NAPrerollNoteChannel
  6774.     ENDIF
  6775.  
  6776. ;
  6777. ; pascal ComponentResult NAUnrollNoteChannel(NoteAllocator na, NoteChannel noteChannel)
  6778. ;
  6779.     IF ¬ GENERATINGCFM THEN
  6780.         Macro
  6781.         _NAUnrollNoteChannel
  6782.             dc.w     $2F3C
  6783.             dc.w     $0004
  6784.             dc.w     $0008
  6785.             moveq    #0,d0
  6786.             dc.w     $A82A
  6787.         EndM
  6788.     ELSE
  6789.         IMPORT_CFM_FUNCTION    NAUnrollNoteChannel
  6790.     ENDIF
  6791.  
  6792. ;
  6793. ; pascal ComponentResult NAEngageNoteChannel(NoteAllocator na, NoteChannel noteChannel)
  6794. ;
  6795.     IF ¬ GENERATINGCFM THEN
  6796.         Macro
  6797.         _NAEngageNoteChannel
  6798.             dc.w     $2F3C
  6799.             dc.w     $0004
  6800.             dc.w     $0009
  6801.             moveq    #0,d0
  6802.             dc.w     $A82A
  6803.         EndM
  6804.     ELSE
  6805.         IMPORT_CFM_FUNCTION    NAEngageNoteChannel
  6806.     ENDIF
  6807.  
  6808. ;
  6809. ; pascal ComponentResult NADisengageNoteChannel(NoteAllocator na, NoteChannel noteChannel, long silenceNotes)
  6810. ;
  6811.     IF ¬ GENERATINGCFM THEN
  6812.         Macro
  6813.         _NADisengageNoteChannel
  6814.             dc.w     $2F3C
  6815.             dc.w     $0008
  6816.             dc.w     $000A
  6817.             moveq    #0,d0
  6818.             dc.w     $A82A
  6819.         EndM
  6820.     ELSE
  6821.         IMPORT_CFM_FUNCTION    NADisengageNoteChannel
  6822.     ENDIF
  6823.  
  6824. ;
  6825. ; pascal ComponentResult NAGetNoteChannelState(NoteAllocator na, NoteChannel noteChannel, long instrumentNumber, Handle *state)
  6826. ;
  6827.     IF ¬ GENERATINGCFM THEN
  6828.         Macro
  6829.         _NAGetNoteChannelState
  6830.             dc.w     $2F3C
  6831.             dc.w     $000C
  6832.             dc.w     $0017
  6833.             moveq    #0,d0
  6834.             dc.w     $A82A
  6835.         EndM
  6836.     ELSE
  6837.         IMPORT_CFM_FUNCTION    NAGetNoteChannelState
  6838.     ENDIF
  6839.  
  6840. ;
  6841. ; pascal ComponentResult NASetNoteChannelState(NoteAllocator na, NoteChannel noteChannel, long instrumentNumber, Handle state)
  6842. ;
  6843.     IF ¬ GENERATINGCFM THEN
  6844.         Macro
  6845.         _NASetNoteChannelState
  6846.             dc.w     $2F3C
  6847.             dc.w     $000C
  6848.             dc.w     $0018
  6849.             moveq    #0,d0
  6850.             dc.w     $A82A
  6851.         EndM
  6852.     ELSE
  6853.         IMPORT_CFM_FUNCTION    NASetNoteChannelState
  6854.     ENDIF
  6855.  
  6856. ;
  6857. ; pascal ComponentResult NAResetNoteChannel(NoteAllocator na, NoteChannel noteChannel)
  6858. ;
  6859.     IF ¬ GENERATINGCFM THEN
  6860.         Macro
  6861.         _NAResetNoteChannel
  6862.             dc.w     $2F3C
  6863.             dc.w     $0004
  6864.             dc.w     $000C
  6865.             moveq    #0,d0
  6866.             dc.w     $A82A
  6867.         EndM
  6868.     ELSE
  6869.         IMPORT_CFM_FUNCTION    NAResetNoteChannel
  6870.     ENDIF
  6871.  
  6872. ;
  6873. ; pascal ComponentResult NASetNoteChannelVolume(NoteAllocator na, NoteChannel noteChannel, Fixed volume)
  6874. ;
  6875.     IF ¬ GENERATINGCFM THEN
  6876.         Macro
  6877.         _NASetNoteChannelVolume
  6878.             dc.w     $2F3C
  6879.             dc.w     $0008
  6880.             dc.w     $000B
  6881.             moveq    #0,d0
  6882.             dc.w     $A82A
  6883.         EndM
  6884.     ELSE
  6885.         IMPORT_CFM_FUNCTION    NASetNoteChannelVolume
  6886.     ENDIF
  6887.  
  6888. ;
  6889. ; pascal ComponentResult NASetInstrument(NoteAllocator na, NoteChannel noteChannel, InstrumentData *instrumentData)
  6890. ;
  6891.     IF ¬ GENERATINGCFM THEN
  6892.         Macro
  6893.         _NASetInstrument
  6894.             dc.w     $2F3C
  6895.             dc.w     $0008
  6896.             dc.w     $001E
  6897.             moveq    #0,d0
  6898.             dc.w     $A82A
  6899.         EndM
  6900.     ELSE
  6901.         IMPORT_CFM_FUNCTION    NASetInstrument
  6902.     ENDIF
  6903.  
  6904. ;
  6905. ; pascal ComponentResult NASetFlatInstrument(NoteAllocator na, NoteChannel noteChannel, FlatInstrument *flatInstrument)
  6906. ;
  6907.     IF ¬ GENERATINGCFM THEN
  6908.         Macro
  6909.         _NASetFlatInstrument
  6910.             dc.w     $2F3C
  6911.             dc.w     $0008
  6912.             dc.w     $001D
  6913.             moveq    #0,d0
  6914.             dc.w     $A82A
  6915.         EndM
  6916.     ELSE
  6917.         IMPORT_CFM_FUNCTION    NASetFlatInstrument
  6918.     ENDIF
  6919.  
  6920. ;
  6921. ; * Control
  6922. ;
  6923. ; pascal ComponentResult NAPlayNote(NoteAllocator na, NoteChannel noteChannel, long pitch, long velocity)
  6924. ;
  6925.     IF ¬ GENERATINGCFM THEN
  6926.         Macro
  6927.         _NAPlayNote
  6928.             dc.w     $2F3C
  6929.             dc.w     $000C
  6930.             dc.w     $000D
  6931.             moveq    #0,d0
  6932.             dc.w     $A82A
  6933.         EndM
  6934.     ELSE
  6935.         IMPORT_CFM_FUNCTION    NAPlayNote
  6936.     ENDIF
  6937.  
  6938. ;
  6939. ; pascal ComponentResult NASetController(NoteAllocator na, NoteChannel noteChannel, long controllerNumber, long controllerValue)
  6940. ;
  6941.     IF ¬ GENERATINGCFM THEN
  6942.         Macro
  6943.         _NASetController
  6944.             dc.w     $2F3C
  6945.             dc.w     $000C
  6946.             dc.w     $000E
  6947.             moveq    #0,d0
  6948.             dc.w     $A82A
  6949.         EndM
  6950.     ELSE
  6951.         IMPORT_CFM_FUNCTION    NASetController
  6952.     ENDIF
  6953.  
  6954. ;
  6955. ; pascal ComponentResult NASetKnob(NoteAllocator na, NoteChannel noteChannel, long knobNumber, long knobValue)
  6956. ;
  6957.     IF ¬ GENERATINGCFM THEN
  6958.         Macro
  6959.         _NASetKnob
  6960.             dc.w     $2F3C
  6961.             dc.w     $000C
  6962.             dc.w     $000F
  6963.             moveq    #0,d0
  6964.             dc.w     $A82A
  6965.         EndM
  6966.     ELSE
  6967.         IMPORT_CFM_FUNCTION    NASetKnob
  6968.     ENDIF
  6969.  
  6970. ;
  6971. ; pascal ComponentResult NAFindNoteChannelTone(NoteAllocator na, NoteChannel noteChannel, ToneDescription *td, long *instrumentNumber)
  6972. ;
  6973.     IF ¬ GENERATINGCFM THEN
  6974.         Macro
  6975.         _NAFindNoteChannelTone
  6976.             dc.w     $2F3C
  6977.             dc.w     $000C
  6978.             dc.w     $0010
  6979.             moveq    #0,d0
  6980.             dc.w     $A82A
  6981.         EndM
  6982.     ELSE
  6983.         IMPORT_CFM_FUNCTION    NAFindNoteChannelTone
  6984.     ENDIF
  6985.  
  6986. ;
  6987. ; pascal ComponentResult NASetNoteChannelInstrument(NoteAllocator na, NoteChannel noteChannel, long instrumentNumber)
  6988. ;
  6989.     IF ¬ GENERATINGCFM THEN
  6990.         Macro
  6991.         _NASetNoteChannelInstrument
  6992.             dc.w     $2F3C
  6993.             dc.w     $0008
  6994.             dc.w     $0011
  6995.             moveq    #0,d0
  6996.             dc.w     $A82A
  6997.         EndM
  6998.     ELSE
  6999.         IMPORT_CFM_FUNCTION    NASetNoteChannelInstrument
  7000.     ENDIF
  7001.  
  7002. ;
  7003. ; * User Interface
  7004. ;
  7005. ; pascal ComponentResult NAPickInstrument(NoteAllocator na, ModalFilterUPP filterProc, StringPtr prompt, ToneDescription *sd, unsigned long flags, long refCon, Ptr *flatList, long *flatChoiceIndex)
  7006. ;
  7007.     IF ¬ GENERATINGCFM THEN
  7008.         Macro
  7009.         _NAPickInstrument
  7010.             dc.w     $2F3C
  7011.             dc.w     $001C
  7012.             dc.w     $0012
  7013.             moveq    #0,d0
  7014.             dc.w     $A82A
  7015.         EndM
  7016.     ELSE
  7017.         IMPORT_CFM_FUNCTION    NAPickInstrument
  7018.     ENDIF
  7019.  
  7020. ;
  7021. ; pascal ComponentResult NAStuffToneDescription(NoteAllocator na, long gmNumber, ToneDescription *td)
  7022. ;
  7023.     IF ¬ GENERATINGCFM THEN
  7024.         Macro
  7025.         _NAStuffToneDescription
  7026.             dc.w     $2F3C
  7027.             dc.w     $0008
  7028.             dc.w     $001B
  7029.             moveq    #0,d0
  7030.             dc.w     $A82A
  7031.         EndM
  7032.     ELSE
  7033.         IMPORT_CFM_FUNCTION    NAStuffToneDescription
  7034.     ENDIF
  7035.  
  7036. ;
  7037. ; pascal ComponentResult NAPickArrangement(NoteAllocator na, ModalFilterUPP filterProc, StringPtr prompt, long partCount, NoteRequest *noteRequestList, Track t, StringPtr songName)
  7038. ;
  7039.     IF ¬ GENERATINGCFM THEN
  7040.         Macro
  7041.         _NAPickArrangement
  7042.             dc.w     $2F3C
  7043.             dc.w     $0018
  7044.             dc.w     $0013
  7045.             moveq    #0,d0
  7046.             dc.w     $A82A
  7047.         EndM
  7048.     ELSE
  7049.         IMPORT_CFM_FUNCTION    NAPickArrangement
  7050.     ENDIF
  7051.  
  7052. ;
  7053. ; pascal ComponentResult NACopyrightDialog(NoteAllocator na, PicHandle p, StringPtr author, StringPtr copyright, StringPtr other, StringPtr title, ModalFilterUPP filterProc, long refCon)
  7054. ;
  7055.     IF ¬ GENERATINGCFM THEN
  7056.         Macro
  7057.         _NACopyrightDialog
  7058.             dc.w     $2F3C
  7059.             dc.w     $001C
  7060.             dc.w     $001C
  7061.             moveq    #0,d0
  7062.             dc.w     $A82A
  7063.         EndM
  7064.     ELSE
  7065.         IMPORT_CFM_FUNCTION    NACopyrightDialog
  7066.     ENDIF
  7067.  
  7068. ;
  7069. ; * Note Allocator interior views
  7070. NAStatPiece             RECORD    0
  7071. clientName                 ds.l   8        ; offset: $0 (0)
  7072. synthesizerName             ds.l   8        ; offset: $20 (32)
  7073. part                     ds.l   1        ; offset: $40 (64)
  7074. midiChannel                 ds.l   1        ; offset: $44 (68)
  7075. polyphony                 ds.l   1        ; offset: $48 (72)
  7076. valid                     ds.l   1        ; offset: $4C (76)
  7077. sizeof                     EQU *            ; size:   $50 (80)
  7078.                         ENDR
  7079.  
  7080. ; typedef struct NAStatPiece  NAStatPiece
  7081. NAStat                     RECORD    0
  7082. pieceCount                 ds.l   1        ; offset: $0 (0)
  7083. piece                     ds.b   64 * NAStatPiece.sizeof ; offset: $4 (4)
  7084. sizeof                     EQU *            ; size:   $1404 (5124)
  7085.                         ENDR
  7086.  
  7087. ; typedef struct NAStat     NAStat
  7088. ;
  7089. ; pascal ComponentResult NAGetStatusBlock(NoteAllocator na, NAStat *stat)
  7090. ;
  7091.     IF ¬ GENERATINGCFM THEN
  7092.         Macro
  7093.         _NAGetStatusBlock
  7094.             dc.w     $2F3C
  7095.             dc.w     $0004
  7096.             dc.w     $0014
  7097.             moveq    #0,d0
  7098.             dc.w     $A82A
  7099.         EndM
  7100.     ELSE
  7101.         IMPORT_CFM_FUNCTION    NAGetStatusBlock
  7102.     ENDIF
  7103.  
  7104. ;--------------------------
  7105. ;    Types
  7106. ;--------------------------
  7107.  
  7108. kTuneQueueDepth                    EQU        8                    ; Deepest you can queue tune segments 
  7109.  
  7110. TuneStatus                 RECORD    0
  7111. tune                     ds.l   1        ; offset: $0 (0)        ; currently playing tune 
  7112. tunePtr                     ds.l   1        ; offset: $4 (4)        ; position within currently playing piece 
  7113. time                     ds.l   1        ; offset: $8 (8)        ; current tune time 
  7114. queueCount                 ds.w   1        ; offset: $C (12)        ; how many pieces queued up? 
  7115. queueSpots                 ds.w   1        ; offset: $E (14)        ; How many more tunepieces can be queued 
  7116. queueTime                 ds.l   1        ; offset: $10 (16)        ; How much time is queued up? (can be very inaccurate) 
  7117. reserved                 ds.l   3        ; offset: $14 (20)
  7118. sizeof                     EQU *            ; size:   $20 (32)
  7119.                         ENDR
  7120.  
  7121. ; typedef struct TuneStatus  TuneStatus
  7122.  
  7123. kStopTuneFade                    EQU        1                    ; do a quick, synchronous fadeout 
  7124. kStopTuneSustain                EQU        2                    ; don't silece notes 
  7125. kStopTuneInstant                EQU        4                    ; silence notes fast (else, decay them) 
  7126. kStopTuneReleaseChannels        EQU        8                    ; afterwards, let the channels go 
  7127.  
  7128. kTuneSelect                        EQU        3
  7129. kTuneSetHeaderSelect            EQU        4
  7130. kTuneGetTimeBaseSelect            EQU        5
  7131. kTuneSetTimeScaleSelect            EQU        6
  7132. kTuneGetTimeScaleSelect            EQU        7
  7133. kTuneGetIndexedNoteChannelSelect EQU        8
  7134. kTuneDummy                        EQU        9
  7135. kTuneQueueSelect                EQU        10
  7136. kTuneInstantSelect                EQU        11
  7137. kTuneGetStatusSelect            EQU        12
  7138. kTuneStopSelect                    EQU        13
  7139. kTuneResumeSelect                EQU        14
  7140. kTuneFlushSelect                EQU        15
  7141. kTuneSetVolumeSelect            EQU        16
  7142. kTuneGetVolumeSelect            EQU        17
  7143. kTunePrerollSelect                EQU        18
  7144. kTuneUnrollSelect                EQU        19
  7145. kTuneLastSelector                EQU        20
  7146.  
  7147. ; typedef ComponentInstance  TunePlayer
  7148.  
  7149. kMaxTunePlayerParts                EQU        32
  7150. kTunePlayerType                    EQU        'tune'
  7151.  
  7152. ;--------------------------
  7153. ;    Prototypes
  7154. ;--------------------------
  7155. ;
  7156. ; pascal ComponentResult TuneSetHeader(TunePlayer tp, unsigned long *header)
  7157. ;
  7158.     IF ¬ GENERATINGCFM THEN
  7159.         Macro
  7160.         _TuneSetHeader
  7161.             dc.w     $2F3C
  7162.             dc.w     $0004
  7163.             dc.w     $0004
  7164.             moveq    #0,d0
  7165.             dc.w     $A82A
  7166.         EndM
  7167.     ELSE
  7168.         IMPORT_CFM_FUNCTION    TuneSetHeader
  7169.     ENDIF
  7170.  
  7171. ;
  7172. ; pascal ComponentResult TuneGetTimeBase(TunePlayer tp, TimeBase *tb)
  7173. ;
  7174.     IF ¬ GENERATINGCFM THEN
  7175.         Macro
  7176.         _TuneGetTimeBase
  7177.             dc.w     $2F3C
  7178.             dc.w     $0004
  7179.             dc.w     $0005
  7180.             moveq    #0,d0
  7181.             dc.w     $A82A
  7182.         EndM
  7183.     ELSE
  7184.         IMPORT_CFM_FUNCTION    TuneGetTimeBase
  7185.     ENDIF
  7186.  
  7187. ;
  7188. ; pascal ComponentResult TuneSetTimeScale(TunePlayer tp, TimeScale scale)
  7189. ;
  7190.     IF ¬ GENERATINGCFM THEN
  7191.         Macro
  7192.         _TuneSetTimeScale
  7193.             dc.w     $2F3C
  7194.             dc.w     $0004
  7195.             dc.w     $0006
  7196.             moveq    #0,d0
  7197.             dc.w     $A82A
  7198.         EndM
  7199.     ELSE
  7200.         IMPORT_CFM_FUNCTION    TuneSetTimeScale
  7201.     ENDIF
  7202.  
  7203. ;
  7204. ; pascal ComponentResult TuneGetTimeScale(TunePlayer tp, TimeScale *scale)
  7205. ;
  7206.     IF ¬ GENERATINGCFM THEN
  7207.         Macro
  7208.         _TuneGetTimeScale
  7209.             dc.w     $2F3C
  7210.             dc.w     $0004
  7211.             dc.w     $0007
  7212.             moveq    #0,d0
  7213.             dc.w     $A82A
  7214.         EndM
  7215.     ELSE
  7216.         IMPORT_CFM_FUNCTION    TuneGetTimeScale
  7217.     ENDIF
  7218.  
  7219. ;
  7220. ; pascal ComponentResult TuneGetIndexedNoteChannel(TunePlayer tp, long i, NoteChannel *nc)
  7221. ;
  7222.     IF ¬ GENERATINGCFM THEN
  7223.         Macro
  7224.         _TuneGetIndexedNoteChannel
  7225.             dc.w     $2F3C
  7226.             dc.w     $0008
  7227.             dc.w     $0008
  7228.             moveq    #0,d0
  7229.             dc.w     $A82A
  7230.         EndM
  7231.     ELSE
  7232.         IMPORT_CFM_FUNCTION    TuneGetIndexedNoteChannel
  7233.     ENDIF
  7234.  
  7235. ; Values for when to start. 
  7236. kTuneStartNow                    EQU        1                    ; start after buffer is implied 
  7237. kTuneDontClipNotes                EQU        2                    ; allow notes to finish their durations outside sample 
  7238. kTuneExcludeEdgeNotes            EQU        4                    ; dont play notes that start at end of tune 
  7239. kTuneStartNewMaster                EQU        16384
  7240.  
  7241. ;
  7242. ; pascal ComponentResult TuneQueue(TunePlayer tp, unsigned long *tune, Fixed tuneRate, unsigned long tuneStartPosition, unsigned long tuneStopPosition, unsigned long queueFlags, TuneCallBackUPP callBackProc, long refCon)
  7243. ;
  7244.     IF ¬ GENERATINGCFM THEN
  7245.         Macro
  7246.         _TuneQueue
  7247.             dc.w     $2F3C
  7248.             dc.w     $001C
  7249.             dc.w     $000A
  7250.             moveq    #0,d0
  7251.             dc.w     $A82A
  7252.         EndM
  7253.     ELSE
  7254.         IMPORT_CFM_FUNCTION    TuneQueue
  7255.     ENDIF
  7256.  
  7257. ;
  7258. ; pascal ComponentResult TuneInstant(TunePlayer tp, unsigned long *tune, long tunePosition)
  7259. ;
  7260.     IF ¬ GENERATINGCFM THEN
  7261.         Macro
  7262.         _TuneInstant
  7263.             dc.w     $2F3C
  7264.             dc.w     $0008
  7265.             dc.w     $000B
  7266.             moveq    #0,d0
  7267.             dc.w     $A82A
  7268.         EndM
  7269.     ELSE
  7270.         IMPORT_CFM_FUNCTION    TuneInstant
  7271.     ENDIF
  7272.  
  7273. ;
  7274. ; pascal ComponentResult TuneGetStatus(TunePlayer tp, TuneStatus *status)
  7275. ;
  7276.     IF ¬ GENERATINGCFM THEN
  7277.         Macro
  7278.         _TuneGetStatus
  7279.             dc.w     $2F3C
  7280.             dc.w     $0004
  7281.             dc.w     $000C
  7282.             moveq    #0,d0
  7283.             dc.w     $A82A
  7284.         EndM
  7285.     ELSE
  7286.         IMPORT_CFM_FUNCTION    TuneGetStatus
  7287.     ENDIF
  7288.  
  7289. ; Values for when to start. 
  7290. kStopSustain                    EQU        1                    ; Leaves notes playing, not silent 
  7291. kStopFadeout                    EQU        2                    ; Does a synchronous fade-out 
  7292.  
  7293. ;
  7294. ; pascal ComponentResult TuneStop(TunePlayer tp, long stopFlags)
  7295. ;
  7296.     IF ¬ GENERATINGCFM THEN
  7297.         Macro
  7298.         _TuneStop
  7299.             dc.w     $2F3C
  7300.             dc.w     $0004
  7301.             dc.w     $000D
  7302.             moveq    #0,d0
  7303.             dc.w     $A82A
  7304.         EndM
  7305.     ELSE
  7306.         IMPORT_CFM_FUNCTION    TuneStop
  7307.     ENDIF
  7308.  
  7309. ;
  7310. ; pascal ComponentResult TuneResume(TunePlayer tp)
  7311. ;
  7312.     IF ¬ GENERATINGCFM THEN
  7313.         Macro
  7314.         _TuneResume
  7315.             dc.w     $2F3C
  7316.             dc.w     $0000
  7317.             dc.w     $000E
  7318.             moveq    #0,d0
  7319.             dc.w     $A82A
  7320.         EndM
  7321.     ELSE
  7322.         IMPORT_CFM_FUNCTION    TuneResume
  7323.     ENDIF
  7324.  
  7325. ;
  7326. ; pascal ComponentResult TuneFlush(TunePlayer tp)
  7327. ;
  7328.     IF ¬ GENERATINGCFM THEN
  7329.         Macro
  7330.         _TuneFlush
  7331.             dc.w     $2F3C
  7332.             dc.w     $0000
  7333.             dc.w     $000F
  7334.             moveq    #0,d0
  7335.             dc.w     $A82A
  7336.         EndM
  7337.     ELSE
  7338.         IMPORT_CFM_FUNCTION    TuneFlush
  7339.     ENDIF
  7340.  
  7341. ;
  7342. ; pascal ComponentResult TuneSetVolume(TunePlayer tp, Fixed volume)
  7343. ;
  7344.     IF ¬ GENERATINGCFM THEN
  7345.         Macro
  7346.         _TuneSetVolume
  7347.             dc.w     $2F3C
  7348.             dc.w     $0004
  7349.             dc.w     $0010
  7350.             moveq    #0,d0
  7351.             dc.w     $A82A
  7352.         EndM
  7353.     ELSE
  7354.         IMPORT_CFM_FUNCTION    TuneSetVolume
  7355.     ENDIF
  7356.  
  7357. ;
  7358. ; pascal ComponentResult TuneGetVolume(TunePlayer tp)
  7359. ;
  7360.     IF ¬ GENERATINGCFM THEN
  7361.         Macro
  7362.         _TuneGetVolume
  7363.             dc.w     $2F3C
  7364.             dc.w     $0000
  7365.             dc.w     $0011
  7366.             moveq    #0,d0
  7367.             dc.w     $A82A
  7368.         EndM
  7369.     ELSE
  7370.         IMPORT_CFM_FUNCTION    TuneGetVolume
  7371.     ENDIF
  7372.  
  7373. ;
  7374. ; pascal ComponentResult TunePreroll(TunePlayer tp)
  7375. ;
  7376.     IF ¬ GENERATINGCFM THEN
  7377.         Macro
  7378.         _TunePreroll
  7379.             dc.w     $2F3C
  7380.             dc.w     $0000
  7381.             dc.w     $0012
  7382.             moveq    #0,d0
  7383.             dc.w     $A82A
  7384.         EndM
  7385.     ELSE
  7386.         IMPORT_CFM_FUNCTION    TunePreroll
  7387.     ENDIF
  7388.  
  7389. ;
  7390. ; pascal ComponentResult TuneUnroll(TunePlayer tp)
  7391. ;
  7392.     IF ¬ GENERATINGCFM THEN
  7393.         Macro
  7394.         _TuneUnroll
  7395.             dc.w     $2F3C
  7396.             dc.w     $0000
  7397.             dc.w     $0013
  7398.             moveq    #0,d0
  7399.             dc.w     $A82A
  7400.         EndM
  7401.     ELSE
  7402.         IMPORT_CFM_FUNCTION    TuneUnroll
  7403.     ENDIF
  7404.  
  7405. ; typedef unsigned long     MusicOpWord, *MusicOpWordPtr
  7406. ;     QuickTime Music Track Event Formats:
  7407. ;
  7408. ;    At this time, QuickTime music tracks support 5 different event types -- REST events,
  7409. ;    short NOTE events, short CONTROL events, short GENERAL events, Long NOTE events, 
  7410. ;    long CONTROL events, and variable GENERAL events.
  7411. ;        • REST Event (4 bytes/event):
  7412. ;    
  7413. ;            (0 0 0) (5-bit UNUSED) (24-bit Rest Duration)
  7414. ;        
  7415. ;        • Short NOTE Events (4 bytes/event):
  7416. ;    
  7417. ;            (0 0 1) (5-bit Instrument) (6-bit Pitch) (7-bit Volume) (11-bit Duration)
  7418. ;        
  7419. ;            where:    Pitch is offset by 32 (Actual pitch = pitch field + 32)
  7420. ;
  7421. ;        • Short CONTROL Events (4 bytes/event):
  7422. ;    
  7423. ;            (0 1 0) (5-bit Instrument) (8-bit Controller) (1-bit UNUSED) (1-bit Sign) (7-bit MSB) (7-bit LSB)
  7424. ;                                                                         ( or 15-bit Signed Value)
  7425. ;        • Short GENERAL Event (4 bytes/event):
  7426. ;    
  7427. ;            (0 1 1) (1-bit UNUSED) (12-bit Sub-Type) (16-bit Value)
  7428. ;    
  7429. ;        • Long NOTE Events (8 bytes/event):
  7430. ;    
  7431. ;            (1 0 0 1) (12-bit Instrument) (1-bit UNUSED) (7-bit Pitch) (1-bit UNUSED) (7-bit Volume)
  7432. ;            (1 0) (8-bit UNUSED) (22-bit Duration)
  7433. ;        
  7434. ;        • Long CONTROL Event (8 bytes/event):
  7435. ;        
  7436. ;            (1 0 1 0) (12-bit Instrument) (16-bit Value MSB) 
  7437. ;            (1 0) (14-bit Controller) (16-bit Value LSB)
  7438. ;    
  7439. ;        • Long KNOB Event (8 bytes/event):
  7440. ;    
  7441. ;            (1 0 1 1) (12-bit Sub-Type) (16-bit Value MSB)
  7442. ;            (1 0) (14-bit KNOB) (16-bit Value LSB)
  7443. ;    
  7444. ;        • Variable GENERAL Length Events (N bytes/event):
  7445. ;    
  7446. ;            (1 1 1 1) (12-bit Sub-Type) (16-bit Length)
  7447. ;                :
  7448. ;            (32-bit Data values)
  7449. ;                :
  7450. ;            (1 1) (14-bit UNUSED) (16-bit Length)
  7451. ;    
  7452. ;            where:    Length field is the number of LONG words in the record.
  7453. ;                    Lengths include the first and last long words (Minimum length = 2)
  7454. ;                
  7455. ;    The following event type values have not been used yet and are reserved for 
  7456. ;    future expansion:
  7457. ;        
  7458. ;        • (1 0 0 0)        (8 bytes/event)
  7459. ;        • (1 1 0 0)        (N bytes/event)
  7460. ;        • (1 1 0 1)        (N bytes/event)
  7461. ;        • (1 1 1 0)        (N bytes/event)
  7462. ;        
  7463. ;    For all events, the following generalizations apply:
  7464. ;    
  7465. ;        -    All duration values are specified in Millisecond units.
  7466. ;        -     Pitch values are intended to map directly to the MIDI key numbers.
  7467. ;        -    Controllers from 0 to 127 correspond to the standard MIDI controllers.
  7468. ;            Controllers greater than 127 correspond to other controls (i.e., Pitch Bend, 
  7469. ;            Key Pressure, and Channel Pressure).    
  7470. ;
  7471. ; Defines for the implemented music event data fields
  7472.  
  7473. kRestEventType                    EQU        $0                    ; lower 3-bits 
  7474. kNoteEventType                    EQU        $1                    ; lower 3-bits 
  7475. kControlEventType                EQU        $2                    ; lower 3-bits 
  7476. kMarkerEventType                EQU        $3                    ; lower 3-bits 
  7477. kUndefined1EventType            EQU        $8                    ; 4-bits 
  7478. kXNoteEventType                    EQU        $9                    ; 4-bits 
  7479. kXControlEventType                EQU        $A                    ; 4-bits 
  7480. kKnobEventType                    EQU        $B                    ; 4-bits 
  7481. kUndefined2EventType            EQU        $C                    ; 4-bits 
  7482. kUndefined3EventType            EQU        $D                    ; 4-bits 
  7483. kUndefined4EventType            EQU        $E                    ; 4-bits 
  7484. kGeneralEventType                EQU        $F                    ; 4-bits 
  7485. kXEventLengthBits                EQU        $2                    ; 2 bits: indicates 8-byte event record 
  7486. kGeneralEventLengthBits            EQU        $3                    ; 2 bits: indicates variable length event record 
  7487. kEventLen                        EQU        1                    ; length of events in long words 
  7488. kXEventLen                        EQU        2
  7489. kRestEventLen                    EQU        kEventLen            ; length of events in long words 
  7490. kNoteEventLen                    EQU        kEventLen
  7491. kControlEventLen                EQU        kEventLen
  7492. kMarkerEventLen                    EQU        kEventLen
  7493. kXNoteEventLen                    EQU        kXEventLen
  7494. kXControlEventLen                EQU        kXEventLen
  7495. kGeneralEventLen                EQU        kXEventLen            ; 2 or more, however 
  7496. ; Universal Event Defines
  7497. kEventLengthFieldPos            EQU        30                    ; by looking at these two bits of the 1st or last word              
  7498. kEventLengthFieldWidth            EQU        2                    ; of an event you can determine the event length                      
  7499. ; length field: 0 & 1 => 1 long; 2 => 2 longs; 3 => variable length 
  7500. kEventTypeFieldPos                EQU        29                    ; event type field for short events 
  7501. kEventTypeFieldWidth            EQU        3                    ; short type is 3 bits 
  7502. kXEventTypeFieldPos                EQU        28                    ; event type field for extended events 
  7503. kXEventTypeFieldWidth            EQU        4                    ; extended type is 4 bits 
  7504. kEventInstrumentFieldPos        EQU        24
  7505. kEventInstrumentFieldWidth        EQU        5
  7506. kXEventInstrumentFieldPos        EQU        16                    ; in the 1st long word 
  7507. kXEventInstrumentFieldWidth        EQU        12
  7508. ; Rest Events
  7509. kRestEventDurationFieldPos        EQU        0
  7510. kRestEventDurationFieldWidth    EQU        24
  7511. kRestEventDurationMax            EQU        ((1 << kRestEventDurationFieldWidth) - 1)
  7512. ; Note Events
  7513. kNoteEventPitchFieldPos            EQU        18
  7514. kNoteEventPitchFieldWidth        EQU        6
  7515. kNoteEventPitchOffset            EQU        32                    ; add to value in pitch field to get actual pitch 
  7516. kNoteEventVolumeFieldPos        EQU        11
  7517. kNoteEventVolumeFieldWidth        EQU        7
  7518. kNoteEventVolumeOffset            EQU        0                    ; add to value in volume field to get actual volume 
  7519. kNoteEventDurationFieldPos        EQU        0
  7520. kNoteEventDurationFieldWidth    EQU        11
  7521. kNoteEventDurationMax            EQU        ((1 << kNoteEventDurationFieldWidth) - 1)
  7522. kXNoteEventPitchFieldPos        EQU        0                    ; in the 1st long word 
  7523. kXNoteEventPitchFieldWidth        EQU        16
  7524. kXNoteEventDurationFieldPos        EQU        0                    ; in the 2nd long word 
  7525. kXNoteEventDurationFieldWidth    EQU        22
  7526. kXNoteEventDurationMax            EQU        ((1 << kXNoteEventDurationFieldWidth) - 1)
  7527. kXNoteEventVolumeFieldPos        EQU        22                    ; in the 2nd long word 
  7528. kXNoteEventVolumeFieldWidth        EQU        7
  7529. ; Control Events
  7530. kControlEventControllerFieldPos    EQU        16
  7531. kControlEventControllerFieldWidth EQU        8
  7532. kControlEventValueFieldPos        EQU        0
  7533. kControlEventValueFieldWidth    EQU        16
  7534. kXControlEventControllerFieldPos EQU        0                    ; in the 2nd long word 
  7535. kXControlEventControllerFieldWidth EQU        16
  7536. kXControlEventValueFieldPos        EQU        0                    ; in the 1st long word 
  7537. kXControlEventValueFieldWidth    EQU        16
  7538. ; Knob Events
  7539. kKnobEventValueHighFieldPos        EQU        0                    ; 1st long word 
  7540. kKnobEventValueHighFieldWidth    EQU        16
  7541. kKnobEventKnobFieldPos            EQU        16                    ; 2nd long word 
  7542. kKnobEventKnobFieldWidth        EQU        14
  7543. kKnobEventValueLowFieldPos        EQU        0                    ; 2nd long word 
  7544. kKnobEventValueLowFieldWidth    EQU        16
  7545. ; Marker Events
  7546. kMarkerEventSubtypeFieldPos        EQU        16
  7547. kMarkerEventSubtypeFieldWidth    EQU        8
  7548. kMarkerEventValueFieldPos        EQU        0
  7549. kMarkerEventValueFieldWidth        EQU        16
  7550. ; General Events
  7551. kGeneralEventSubtypeFieldPos    EQU        16                    ; in the last long word 
  7552. kGeneralEventSubtypeFieldWidth    EQU        14
  7553. kGeneralEventLengthFieldPos        EQU        0                    ; in the 1st & last long words 
  7554. kGeneralEventLengthFieldWidth    EQU        16
  7555.  
  7556. kGeneralEventNoteRequest        EQU        1                    ; Encapsulates NoteRequest data structure 
  7557. kGeneralEventInstrument            EQU        2                    ; Encapsulates poly, typical poly, followed by InstrumentData record 
  7558. kGeneralEventFlatInstrument        EQU        3                    ; Encapsulates poly, typical poly, followed by FlatInstrument record 
  7559. kGeneralEventPartName            EQU        4                    ; Brackets 2 longs follwed by a pascal string (padded to long alignment) 
  7560. kGeneralEventPartKey            EQU        5                    ; Brackets 2 longs 
  7561.  
  7562. TCSourceRefNameType                EQU        'name'
  7563.  
  7564. tcDropFrame                        EQU        1 << 0
  7565. tc24HourMax                        EQU        1 << 1
  7566. tcNegTimesOK                    EQU        1 << 2
  7567. tcCounter                        EQU        1 << 3
  7568.  
  7569. TimeCodeDef             RECORD    0
  7570. flags                     ds.l   1        ; offset: $0 (0)        ; drop-frame, etc.
  7571. fTimeScale                 ds.l   1        ; offset: $4 (4)        ; time scale of frameDuration (eg. 2997)
  7572. frameDuration             ds.l   1        ; offset: $8 (8)        ; duration of each frame (eg. 100)
  7573. numFrames                 ds.b   1        ; offset: $C (12)        ; number of frames per second for timecode (eg. 30)
  7574. ; number of frames per tick for counter mode
  7575. padding                     ds.b   1        ; offset: $D (13)        ; unused padding byte 
  7576. sizeof                     EQU *            ; size:   $E (14)
  7577.                         ENDR
  7578.  
  7579. ; typedef struct TimeCodeDef  TimeCodeDef
  7580.  
  7581. tctNegFlag                        EQU        $80                    ; negative bit is in minutes
  7582.  
  7583. TimeCodeTime             RECORD    0
  7584. hours                     ds.b   1        ; offset: $0 (0)
  7585. minutes                     ds.b   1        ; offset: $1 (1)
  7586. seconds                     ds.b   1        ; offset: $2 (2)
  7587. frames                     ds.b   1        ; offset: $3 (3)
  7588. sizeof                     EQU *            ; size:   $4 (4)
  7589.                         ENDR
  7590.  
  7591. ; typedef struct TimeCodeTime  TimeCodeTime
  7592. TimeCodeCounter         RECORD    0
  7593. counter                     ds.l   1        ; offset: $0 (0)
  7594. sizeof                     EQU *            ; size:   $4 (4)
  7595.                         ENDR
  7596.  
  7597. ; typedef struct TimeCodeCounter  TimeCodeCounter
  7598. TimeCodeDescription     RECORD    0
  7599. ; standard sample description header
  7600. descSize                 ds.l   1        ; offset: $0 (0)
  7601. dataFormat                 ds.l   1        ; offset: $4 (4)
  7602. resvd1                     ds.l   1        ; offset: $8 (8)
  7603. resvd2                     ds.w   1        ; offset: $C (12)
  7604. dataRefIndex             ds.w   1        ; offset: $E (14)
  7605. ; timecode specific stuff
  7606. flags                     ds.l   1        ; offset: $10 (16)
  7607. timeCodeDef                 ds     TimeCodeDef ; offset: $14 (20)
  7608. srcRef                     ds.l   1        ; offset: $22 (34)
  7609. sizeof                     EQU *            ; size:   $26 (38)
  7610.                         ENDR
  7611.  
  7612. ; typedef struct TimeCodeDescription  TimeCodeDescription
  7613. ; typedef TimeCodeDescription  *TimeCodeDescriptionPtr
  7614. ; typedef TimeCodeDescriptionPtr  *TimeCodeDescriptionHandle
  7615.  
  7616. tcdfShowTimeCode                EQU        1 << 0
  7617.  
  7618. kTCGetCurrentTimeCodeSelect        EQU        257
  7619. kTCGetTimeCodeAtTimeSelect        EQU        258
  7620. kTCTimeCodeToStringSelect        EQU        259
  7621. kTCTimeCodeToFrameNumberSelect    EQU        260
  7622. kTCFrameNumberToTimeCodeSelect    EQU        261
  7623. kTCGetSourceRefSelect            EQU        262
  7624. kTCSetSourceRefSelect            EQU        263
  7625. kTCSetTimeCodeFlagsSelect        EQU        264
  7626. kTCGetTimeCodeFlagsSelect        EQU        265
  7627. kTCSetDisplayOptionsSelect        EQU        266
  7628. kTCGetDisplayOptionsSelect        EQU        267
  7629.  
  7630. ;
  7631. ; pascal HandlerError TCGetCurrentTimeCode(MediaHandler mh, long *frameNum, TimeCodeDef *tcdef, TimeCodeRecord *tcrec, UserData *srcRefH)
  7632. ;
  7633.     IF ¬ GENERATINGCFM THEN
  7634.         Macro
  7635.         _TCGetCurrentTimeCode
  7636.             dc.w     $2F3C
  7637.             dc.w     $0010
  7638.             dc.w     $0101
  7639.             moveq    #0,d0
  7640.             dc.w     $A82A
  7641.         EndM
  7642.     ELSE
  7643.         IMPORT_CFM_FUNCTION    TCGetCurrentTimeCode
  7644.     ENDIF
  7645.  
  7646. ;
  7647. ; pascal HandlerError TCGetTimeCodeAtTime(MediaHandler mh, TimeValue mediaTime, long *frameNum, TimeCodeDef *tcdef, TimeCodeRecord *tcdata, UserData *srcRefH)
  7648. ;
  7649.     IF ¬ GENERATINGCFM THEN
  7650.         Macro
  7651.         _TCGetTimeCodeAtTime
  7652.             dc.w     $2F3C
  7653.             dc.w     $0014
  7654.             dc.w     $0102
  7655.             moveq    #0,d0
  7656.             dc.w     $A82A
  7657.         EndM
  7658.     ELSE
  7659.         IMPORT_CFM_FUNCTION    TCGetTimeCodeAtTime
  7660.     ENDIF
  7661.  
  7662. ;
  7663. ; pascal HandlerError TCTimeCodeToFrameNumber(MediaHandler mh, TimeCodeDef *tcdef, TimeCodeRecord *tcrec, long *frameNumber)
  7664. ;
  7665.     IF ¬ GENERATINGCFM THEN
  7666.         Macro
  7667.         _TCTimeCodeToFrameNumber
  7668.             dc.w     $2F3C
  7669.             dc.w     $000C
  7670.             dc.w     $0104
  7671.             moveq    #0,d0
  7672.             dc.w     $A82A
  7673.         EndM
  7674.     ELSE
  7675.         IMPORT_CFM_FUNCTION    TCTimeCodeToFrameNumber
  7676.     ENDIF
  7677.  
  7678. ;
  7679. ; pascal HandlerError TCFrameNumberToTimeCode(MediaHandler mh, long frameNumber, TimeCodeDef *tcdef, TimeCodeRecord *tcrec)
  7680. ;
  7681.     IF ¬ GENERATINGCFM THEN
  7682.         Macro
  7683.         _TCFrameNumberToTimeCode
  7684.             dc.w     $2F3C
  7685.             dc.w     $000C
  7686.             dc.w     $0105
  7687.             moveq    #0,d0
  7688.             dc.w     $A82A
  7689.         EndM
  7690.     ELSE
  7691.         IMPORT_CFM_FUNCTION    TCFrameNumberToTimeCode
  7692.     ENDIF
  7693.  
  7694. ;
  7695. ; pascal HandlerError TCTimeCodeToString(MediaHandler mh, TimeCodeDef *tcdef, TimeCodeRecord *tcrec, StringPtr tcStr)
  7696. ;
  7697.     IF ¬ GENERATINGCFM THEN
  7698.         Macro
  7699.         _TCTimeCodeToString
  7700.             dc.w     $2F3C
  7701.             dc.w     $000C
  7702.             dc.w     $0103
  7703.             moveq    #0,d0
  7704.             dc.w     $A82A
  7705.         EndM
  7706.     ELSE
  7707.         IMPORT_CFM_FUNCTION    TCTimeCodeToString
  7708.     ENDIF
  7709.  
  7710. ;
  7711. ; pascal HandlerError TCGetSourceRef(MediaHandler mh, TimeCodeDescriptionHandle tcdH, UserData *srefH)
  7712. ;
  7713.     IF ¬ GENERATINGCFM THEN
  7714.         Macro
  7715.         _TCGetSourceRef
  7716.             dc.w     $2F3C
  7717.             dc.w     $0008
  7718.             dc.w     $0106
  7719.             moveq    #0,d0
  7720.             dc.w     $A82A
  7721.         EndM
  7722.     ELSE
  7723.         IMPORT_CFM_FUNCTION    TCGetSourceRef
  7724.     ENDIF
  7725.  
  7726. ;
  7727. ; pascal HandlerError TCSetSourceRef(MediaHandler mh, TimeCodeDescriptionHandle tcdH, UserData srefH)
  7728. ;
  7729.     IF ¬ GENERATINGCFM THEN
  7730.         Macro
  7731.         _TCSetSourceRef
  7732.             dc.w     $2F3C
  7733.             dc.w     $0008
  7734.             dc.w     $0107
  7735.             moveq    #0,d0
  7736.             dc.w     $A82A
  7737.         EndM
  7738.     ELSE
  7739.         IMPORT_CFM_FUNCTION    TCSetSourceRef
  7740.     ENDIF
  7741.  
  7742. ;
  7743. ; pascal HandlerError TCSetTimeCodeFlags(MediaHandler mh, long flags, long flagsMask)
  7744. ;
  7745.     IF ¬ GENERATINGCFM THEN
  7746.         Macro
  7747.         _TCSetTimeCodeFlags
  7748.             dc.w     $2F3C
  7749.             dc.w     $0008
  7750.             dc.w     $0108
  7751.             moveq    #0,d0
  7752.             dc.w     $A82A
  7753.         EndM
  7754.     ELSE
  7755.         IMPORT_CFM_FUNCTION    TCSetTimeCodeFlags
  7756.     ENDIF
  7757.  
  7758. ;
  7759. ; pascal HandlerError TCGetTimeCodeFlags(MediaHandler mh, long *flags)
  7760. ;
  7761.     IF ¬ GENERATINGCFM THEN
  7762.         Macro
  7763.         _TCGetTimeCodeFlags
  7764.             dc.w     $2F3C
  7765.             dc.w     $0004
  7766.             dc.w     $0109
  7767.             moveq    #0,d0
  7768.             dc.w     $A82A
  7769.         EndM
  7770.     ELSE
  7771.         IMPORT_CFM_FUNCTION    TCGetTimeCodeFlags
  7772.     ENDIF
  7773.  
  7774. ;
  7775. ; pascal HandlerError TCSetDisplayOptions(MediaHandler mh, TCTextOptionsPtr textOptions)
  7776. ;
  7777.     IF ¬ GENERATINGCFM THEN
  7778.         Macro
  7779.         _TCSetDisplayOptions
  7780.             dc.w     $2F3C
  7781.             dc.w     $0004
  7782.             dc.w     $010A
  7783.             moveq    #0,d0
  7784.             dc.w     $A82A
  7785.         EndM
  7786.     ELSE
  7787.         IMPORT_CFM_FUNCTION    TCSetDisplayOptions
  7788.     ENDIF
  7789.  
  7790. ;
  7791. ; pascal HandlerError TCGetDisplayOptions(MediaHandler mh, TCTextOptionsPtr textOptions)
  7792. ;
  7793.     IF ¬ GENERATINGCFM THEN
  7794.         Macro
  7795.         _TCGetDisplayOptions
  7796.             dc.w     $2F3C
  7797.             dc.w     $0004
  7798.             dc.w     $010B
  7799.             moveq    #0,d0
  7800.             dc.w     $A82A
  7801.         EndM
  7802.     ELSE
  7803.         IMPORT_CFM_FUNCTION    TCGetDisplayOptions
  7804.     ENDIF
  7805.  
  7806. ; UPP call backs 
  7807.     ENDIF ; __QUICKTIMECOMPONENTS__
  7808.